1
$\begingroup$

Is it possible to add a texture to more than one object at a time?

$\endgroup$
  • $\begingroup$ Like all objects have the same material? The materials must be apply one time for each mesh. You cannot select multiple objects and apply one material to all of them like expected in other graphic software. $\endgroup$ – andrepazleal Jul 21 '15 at 18:34
  • 2
    $\begingroup$ Add a material to one object. Then select all of the object (making sure the one with the material is the "active" object), hit CTRL-L and select "link materials" $\endgroup$ – ajwood Jul 21 '15 at 18:38
  • $\begingroup$ @ajwood this could be an answer :-) $\endgroup$ – Bithur Jul 21 '15 at 20:33
  • $\begingroup$ similar question $\endgroup$ – David Jul 21 '15 at 23:24
  • $\begingroup$ Could you provide some more info about your current setup? E.g. What render engine you are using? $\endgroup$ – gandalf3 Jul 22 '15 at 6:49
3
$\begingroup$

It's possible link the materials on a selection of objects to a single "active" object.

  1. Add an material to an object: enter image description here

  2. Select all of the objects you want the material on, then select the object from step 1 (it's important that you select that object last; it needs to be the active object). Hit CTRL+L and select Materials

enter image description here

$\endgroup$
2
$\begingroup$

This is an easy way to copy a material to many objects.
First the object with the material should be the active object while all the other objects you want to copy the material to are selected. Then press the "Copy Material to Others" button in the material tab of the property window.
copy material button


animated gif showing the process

$\endgroup$
1
$\begingroup$

Also you can select all those objects you want to assign material to and execute the code:

#assuming there's image loaded in Blender and called 'sky_1'. It's the one you'd like to assign
img = bpy.data.images['sky_1.jpg']
imageTexture = bpy.data.textures.new('Image_Texture', type = 'IMAGE')
imageTexture.image = img

#check presence of material with the same name
if bpy.data.materials.get("textureMaterial") is not None:
    materialToApply = bpy.data.materials["textureMaterial"]
else:
  # create material
  materialToApply = bpy.data.materials.new('textureMaterial')
  materialTexture = materialToApply.texture_slots.add()
  materialTexture.texture = imageTexture
  materialTexture.texture_coords = 'UV'
  materialTexture.mapping = 'FLAT' 

#loop through selected objects and assign the material
for x in bpy.context.selected_objects:
  me = x.data
  me.materials.append(materialToApply)

The small advantage of this (at least for me, I always check twice which one is active if transfering materials) is that it doesn't really matter the objects' selection order in this case.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.