Changing the color of an instanced cubiod using Python

Trying the Python Beta, I am unable to change the color of a cuboid I instantiated in.

redBox = scene.create_cuboid(Vector3(0,-3,0))

redBox.set_property("color", Color("FF0000"))

It should be red, but appears white (unchanged if the second line is not present)
Any advice would be greatly appreciated.

Hi! You can set the color of item like rhis:

redBox.color = Color("FF0000")

And set_property method is for storing custom data within an object as string.

1 Like