Hello, I can control the visibility of the objects I know, but how can I activate and deactivate the red button traffic light?
Is there a python script for it?
Thanks very much!
thank you for reaching out to us. The visibility flags of objects can be accessed with the BaseObject methods .GetEditorMode(), .SetEditorMode(), .GetRenderMode() and .SetRenderMode().See end of posting for an example and BaseObject for the technical documentation.
""" Toggles both the render and editor visbilty of the active object.
if op is None:
if op.GetEditorMode() == c4d.MODE_ON:
Hello I think you have misunderstood I need a command that sets a key frame as shown in the photo, that would be great if you could send me such a Python example file.
thank you for reaching out to us. Again, this is technically a new question, since this is about keyframing, while this topic was about object visibility. Please follow the rule of new topics for new questions.
The dropdown boxes shown in your screenshot are just another way to set the visibility of an object. As the visibility states of an object are just two of its parameters (which can be accessed with the bracket syntax you did already encounter). To keyframe a parameter, and subsequently get "the red dot", you must create a track for that parameter you want to animate and then a keyframe inside the curve of that track. We have a basic CTrack, CCurve and CKey example script for Python on GitHub. You should also look at the Animation examples section in general. Finally, there is the technical documentation for the mentioned types in our Python SDK documentation and the manual for CTrack in our C++ Docummentation which can be useful even when one does not want to use the C++ SDK.
when there are no further questions, we will consider this topic as solved by Wednesday, December the 1st.
Thank you for your understanding,