How to automatically add object to Matte objects? Right now I have to use Pick output of Cryptomatte and then use eyedropper to add all the objects I need.
Ideally, I would like to have a mapping: object -> color
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
I think the best way to do this is to open up a text editor window in blender by putting your mouse on the corner of the 3d view and dragging to open it. This will open up another window and you can change the window type to text editor. Click new and you will have opened up a file. Next open up a python info window using the same procedure. You can now see what all your commands are in python. You can add objects like this by typing this into the text editor:
for i in range(10): *stuff*
replace stuff with the commands that you see printed in the info tab that you used to create your shape. For example, once you make a cube you see a command in the info tab called
bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, location=(0, 0, 0)). You could then copy that command into your code to create your shapes. If you want to learn about python scripting I would recommend reading blender's python documentation.