I need to render a model, and for that, I need to deactivate the ray visibility options (glossy). I need to do it from the python script ( I need to activate it for one scene and deactivate it for another). How can I do it?
edit:
I tried out bpy.context.object.cycles_visibility.glossy = False
, but it does not work, and the option in blender is still checked after I save my model.
bpy.context.object.cycles_visibility.glossy = False
(Back on would naturally beTrue
) $\endgroup$bpy.context.object.cycles_visibility.glossy = False
right before I render, but it has no effect, and the glossy option is checked in the blender application. $\endgroup$