I just started looking into Python and Blender scripting. Needless to say, I have very little understanding of the Python syntax, commands and Blender API.
I’m trying out some simple commands and just now I was trying to assign a Material to an Object (Cube) using the following line:
However, this returns the following error:
TypeError: bpy_prop_collection.add(): not supported for this collection.
Can anyone please explain to me why this is? And also, considering the add() function doesn’t take any arguments, how could I assign a specific material (either by name or index)?
Thanks in advance,