Hello,
I would like to add track (timeline) for each user data I have set on a object .
Here is the code I tried, but I don't know why it's not working
Here is the code I wrote :
import c4d
from c4d import gui
#Création d'une piste pour chaque donnée utilisateur
def AddAnimationTrack(op):
LED = c4d.CTrack(op,c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA,1,c4d.DTYPE_GROUP),c4d.DescLevel(c4d.ID_USERDATA,2,c4d.DTYPE_GROUP),c4d.DescLevel(c4d.ID_USERDATA,3,c4d.DTYPE_REAL)))
op.InsertTrackSorted(LED)
return True
# Main function
def main():
AddAnimationTrack(op)
# Execute main()
if __name__=='__main__':
main()
I work on R21.
You can see the scene here : ADD_TRACK - 1.c4d
Thank you for helping