I have tried several suggestions to create a cube and then apply color to it in a Python script. One such way is describe in Random object color via python . I am currently using python 2.9. Essentially what I have is as follows:
import bpy obj = bpy.ops.mesh.primitive_cube_add() obj.color = (0,0,1,1)
I was trying to create a blue cube. The system console states that there is no attribute for color. This must be an old syntax but I am not able to find the appropriate syntax to perform this basic task.
I also tried to simply cut and paste the bpy statements as I executed them manually but that didn't work either.
Any suggestions would be very much appreciated. Thank you,