I had some c.o.f.f.e.e. scripts that I use to toggle the visibility of objects in c4d on and off. but now that r20 doesn't like coffee my scripts no longer work. I'm having trouble converting them to python since I'm not a scripter. Can anyone help me.
Here is the original coffee script
Hides in editor and in render
CallCommand(1016208); // Hide Objects
CallCommand(100004784); // Renderer Off
Resets object to visible in editor and visible in render
CallCommand(100004779); // Editor Unchanged
CallCommand(100004782); // Renderer Unchanged
These scripts just let me toggle selected objects to be hidden in the editor and renderer without having to toggle the dots.
I've tried to transfer this into python but I can't get it to work with multiple selected objects. Can anyone help me. Here is my python hack right now.
from c4d import gui
#Welcome to the world of Python
obj = object()
obj[c4d.ID_BASEOBJECT_VISIBILITY_EDITOR] = 1
obj[c4d.ID_BASEOBJECT_VISIBILITY_RENDER] = 1
This hides the selected object. But if I select multiple objects it doesn't work.
Any help super appreciated.