Forum for: Modelling, Texturing, Animation, Composting and the whole general usage of Cinema4D.
Moderatori: visualtricks, cappellaiomatto, natas, Arkimed
- Messaggi: 9
- Iscritto il: gio mar 15, 2018 6:45 am
HI, i'm trying to write a script that changes an object's visibility depending on which frame the animation is on, so i thought i may use a scripting tag attached to each object, and rename each object to the frame they should turn on and use a higher/equal comparison between the object name and the current frame
i tried some COFFEE and seems pretty easy to use, but then i found out it's being deprecated, so i think python may be a better choice.
so far i managed to batch rename objects, so the script i need would be something like this:
set variables with frame number and object name
convert object name to integer type
if frame number >= object name, then visibility=100, else, visibility=0
but since i'm really new to python coding, i'm having a hard time coming up with the actual code.
could someone please write it for me, so i can learn from the snippet? thanks in advance
- Messaggi: 3532
- Iscritto il: gio set 23, 2004 5:13 pm
- Località: Pistoia
Hi, you should elaborate a bit what you are aiming for, what's the ultimate goal of the script, as it may have more solutions. I made a script while ago that takes a group of object and make each one visible for 1 frame only. You may have a look here
and see if it fits your needs.