Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Login
    1. Home
    2. Leo_Saramago
    • Profile
    • Following 1
    • Followers 0
    • Topics 10
    • Posts 39
    • Best 1
    • Controversial 0
    • Groups 0

    Leo_Saramago

    @Leo_Saramago

    I'm a Storyteller above all else. IBM Music Festival Winner(2001). Creator of Pensado's Place Theme.

    1
    Reputation
    200
    Profile views
    39
    Posts
    0
    Followers
    1
    Following
    Joined Last Online
    Website leosaramago.com Location Rio de Janeiro - Brazil Age 48

    Leo_Saramago Unfollow Follow

    Best posts made by Leo_Saramago

    • RE: PYTHON - Userdata CTracks and Basecontainer

      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.

      posted in Cinema 4D SDK
      Leo_SaramagoL
      Leo_Saramago

    Latest posts made by Leo_Saramago

    • Hiring C++ Developer

      Hello, everyone!

      I'm looking for a C++ developer to turn a prototype I wrote in Python into a plug-in. You can send me your previous work, private details and rates via LinkedIn (https://www.linkedin.com/in/leo-saramago-755aab7a/) or send an e-mail message to [email protected] .

      Thanks for your time.

      posted in General Talk
      Leo_SaramagoL
      Leo_Saramago
    • RE: How many C++ and Python devs do we have here?

      I'm looking for a C++ developer. I wrote a prototype in Python that needs some love... It's meant to become a real plug-in. Yes, there's a budget. Hey, @a_block , how can I reach you? Anybody else interested? Please, reply to this, let's talk. Thanks for your time.

      posted in General Talk
      Leo_SaramagoL
      Leo_Saramago
    • RE: Global Matrix - Trying to copy data from Mixamo Control Rig with Python

      @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,

      Leo

      posted in Cinema 4D SDK
      Leo_SaramagoL
      Leo_Saramago
    • RE: Global Matrix - Trying to copy data from Mixamo Control Rig with Python

      @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!

      posted in Cinema 4D SDK
      Leo_SaramagoL
      Leo_Saramago
    • RE: Global Matrix - Trying to copy data from Mixamo Control Rig with Python

      @Leo_Saramago This photoshop montage illustrates my point:
      Keyframing_right_after_SetMg.png
      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.
      Keyframing_right_after_SetMg-Viewport.png
      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.

      Thanks for your time,

      Leo

      posted in Cinema 4D SDK
      Leo_SaramagoL
      Leo_Saramago
    • RE: Global Matrix - Trying to copy data from Mixamo Control Rig with Python

      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!

      posted in Cinema 4D SDK
      Leo_SaramagoL
      Leo_Saramago
    • RE: Global Matrix - Trying to copy data from Mixamo Control Rig with Python

      @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.

      posted in Cinema 4D SDK
      Leo_SaramagoL
      Leo_Saramago
    • RE: Global Matrix - Trying to copy data from Mixamo Control Rig with Python

      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:

      import c4d
      
      def main():
          
          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[0].GetMg()
              print (mg.off)
              c4d.CallCommand(12414) #Moves Playhead to Next Frame
      
      # Execute main()
      if __name__=='__main__':
          main()
      
      posted in Cinema 4D SDK
      Leo_SaramagoL
      Leo_Saramago
    • RE: Global Matrix - Trying to copy data from Mixamo Control Rig with Python

      @Leo_Saramago I forgot to mention I have baked the animation in the _bind chain.

      posted in Cinema 4D SDK
      Leo_SaramagoL
      Leo_Saramago
    • Global Matrix - Trying to copy data from Mixamo Control Rig with Python

      Hello, there!

      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?

      Thanks for your time,

      Leo

      posted in Cinema 4D SDK
      Leo_SaramagoL
      Leo_Saramago