Linked Questions

5
votes
1answer
917 views

Assign Material Slot to no material via python

I'd like to, in code, remove a material from a material slot without deleting that material slot (because deleting it would remove the connections between that material slot and the vertices). The ...
2
votes
2answers
3k views

How can I delete a large amount of Materials?

So I am doing renders of SolidWorks models in Blender. The models themselves do not pose a problem for me, however I have noticed that when the materials tab, to be precise the list of materials is ...
1
vote
2answers
2k views

Set the color of faces in python efficiently

I have two cubes obj1 and obj2 and I have a list which has a pair of face numbers of each object. So for example, ...
1
vote
1answer
1k views

How to change objects texture using python in BGE?

What i want to do: If player/ avatar is close to an object, objects texture changes to a higher rez one/ object changes material. How to get distance between two objects using script? How to apply/...
0
votes
1answer
2k views

How to set any material via python

Hello I want to change the material of some objects, since it is not applied the material, I want you to apply via code in python, is a group of three materials that is just an object, I want wif the ...
0
votes
2answers
950 views

How to get indices of the faces to which a material has been applied, using Python?

I have many objects similar to this and I import them into the scene using bpy.ops.import_scene.obj(filepath='model.obj', split_mode="OFF") to do some renderings ...
1
vote
0answers
1k views

Change color of face of object in edit mode?

I have searched but as of yet have not found an answer. Does anyone know how to color a face of an object while in Edit Mode?
1
vote
1answer
924 views

Assign cycles material to mesh in script

I have a mesh object, and I want to fiddle with its material properties in Cycles through a script. I have tried this: I created an object: ...
1
vote
1answer
430 views

Edit an object's material in Blender using python

I wish to edit a component of an object, say a cube, using python script. For example if I need to change the material or color of just one face of the cube/object, can I do that using python?
1
vote
2answers
80 views

It is possible repeat a set of commands for multiple objects? [closed]

I have 645 objects and I would like to repeat the same commands for each one. I followed this tutorial: Is there a way to repeat a set of actions on an object? But the script gives me an error. ...
0
votes
0answers
35 views

How can I assign materials to selected faces

I want to assign specific materials to selected faces with the Blender Python API. This should represent the end of a electrical wire. My goal is to assign a material for the isolation of the wire, ...