I'm a Music Artist driven to bring 3D into my arsenal.
I'm from the Music realm, and I've dealt with all kinds of hardware/software. Cinema 4D gets to be at the very top in every single aspect, support team included.
Thanks again, I'll close this topic now.
@ferdinand Hi! Thanks for clarifying things some more. I guess I was looking for frozen values in the wrong place. Browser search wouldn't give me any results.
The problem with writing CKey into CTrack\CCurve in my original scenario is that I have to pass the values of the keys whenever I apply the methods, and I don't have those values. I have the sources', yes, but not the targets'. The source is a Mixamo Control Rig - frozen values in almost every _bind joint.
That's why I thought of GetMg()/SetMg() iterating over the joint chains within the frame range. They work, but then I have to use CallCommand to set keyframes and do some clean up afterwards. No big deal, really.
So, just to wrap this up, is there a way to set keyframes, other than CallCommand, that doesn't require CKey values?
Thanks for your time,
@m_adam Hi! Thanks for the reply.
None of those would work because the source's curves are not to be copied as they are. I mean, the values of each keyframe in each curve are not necessarily the same because the source has frozen values.
Based on those links you've provided, the only option would be to forget about GetMg()/SetMeg() methods. I would have to retrieve all frozen values from source objects, and use them to offset each key value in every curve. And I'd have to do the same to target objects - because they could also have frozen values. Then, depending on how both source and target objects were nested, I'd have to figure out their overall offsets.
Is this train of thought correct? If so, what's the DescID that would retrieve values stored in "freeze"?
Once again, thanks!
@Leo_Saramago This photoshop montage illustrates my point:
On the left, you can see the curves for my source object. The curves on the right belong to my target object, and they came to be after applying SetMg(mg) in every frame inside a loop. This is the result I'm actually going for, except for the unwanted keyframes concerning Scale. Nothing that I couldn't put up with, I mean, deleting those keyframes wouldn't be trouble at all, it's just that MAXON SDK Team recommends avoiding CallCommands - in this case, I used c4d.CallCommand(12410) #Record Active Objects. As I had mentioned before, the source object has frozen values, hence those curves being different.
As you can see above, both objects have the same animation going on in Global Space. I just want to learn how to achieve this same result the proper way.
Ok, now that I'm sure I've grabbed the proper data via GetMg(), can I apply SetMg() to each target joint and keyframe all properties at once for each frame? Or do I have to go thru each CTrack curve of my target joint and use SetMg() over and over again?
Thanks, these answers have been very helpful!
@mp5gosu and @ferdinand Thank you very much. Really helpful! Sorry for the delay. I'll perform a couple of tests and get back to you before closing this one. Soon, I promise.
For testing purposes: I created a cube and gave it some keyframe animation, then baked it. Console shows the same values for every frame when I execute this simplified version of my original python code:
c4d.CallCommand(12501) #Moves Playhead to Start
obj = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_SELECTIONORDER) #Remember: Select Object in OM
for i in range(10):
mg = obj.GetMg()
c4d.CallCommand(12414) #Moves Playhead to Next Frame
# Execute main()
@Leo_Saramago I forgot to mention I have baked the animation in the _bind chain.
I would like to copy the animation I have on a Mixamo Control Rig to a different character. By different, I mean only the hierarchies and naming convention don't match.
I'm having trouble with copying data from Mixamo Control Rig's _bind joint chain. Most curves and values can't be applied directly because the joints inside the Mixamo Rig have frozen values.
That's why I'm going for GetMg() and SetMg(). I've tried looping within a frame range, but GetMg() always returns the same vectors. I even tried c4d.CallCommand(12414) inside a loop, but no luck. Any pointers?
It sure does answer the question.
Hi! I'm aware Scene Nodes happen after Generators, but I was wondering if they go by the usual -499 to 499 evaluation ranges. Are these exposed in any nodes?