Profile Picture

Get first and last keyframe all several motion clips

Posted By panier.garnier 2 Months Ago
You don't have permission to rate!
Author
Message
panier.garnier
panier.garnier
Posted 2 Months Ago
View Quick Profile
New Member

New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 2, Visits: 76
Hello everyone,

I have several motion clips in my timeline and I'm looking for a way to export a list of the first and last keyframes each clip to a .json file. The idea would then to automatically import and trim the clips in Blender using a custom python script. The issue is I can't find a way to retrieve data about keyframes using python in Iclone. I read about the RKey GetTime function here : https://wiki.reallusion.com/IC_Python_API:RLPy_RKey, but I can't find a way to get it to work properly...

Would anyone have any idea how to make use of this GetTime function by any chance ? Or maybe have some clue about how to get infos about keyframes in the timeline ?

Thank you very much for your time and help,

P

videodv
videodv
Posted 2 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)Distinguished Member (2.3K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 337, Visits: 9.7K
Hi
You may want to have a look at the following link to the  iclone page on github and see if this helps Look Here

Chris.
panier.garnier
panier.garnier
Posted 2 Months Ago
View Quick Profile
New Member

New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)New Member (50 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 2, Visits: 76
Hi Chris,

Thank you for your message. I had a look at the samples you shared and unfortunately it doesn't really help for my purpose...

I think the infos I'm looking for are stored somewhere in the RIClip data (here : http://wiki.reallusion.com/IC_Python_API:RLPy_RIClip). By removing the clip length from the last keyframe, I should be able to find the start frame for each clip. I managed to find the clip length with "clip.GetLength()" but everytime I try to get the last keyframe ( clip.GetLastKeyTime() ) it gives back a value of 0. I'm a bit clueless on how to get this function to work. Would you have any idea ?

P



Reading This Topic