python or coffee script
Posted: Mon Apr 01, 2019 9:51 pm
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
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