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
    • Login
    1. Maxon Developers Forum
    2. q1w2ertyu
    3. Posts
    Q
    • Profile
    • Following 1
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by q1w2ertyu

    • RE: Problems of copying position keyframs to another obj

      @m_adam Thank you for another detailed answer !

      posted in Cinema 4D SDK
      Q
      q1w2ertyu
    • RE: Problems of copying position keyframs to another obj

      Thank you very much, your answer is detailed and the method is really overkill !

      The reason why I don't use Ckey is that I got a lots of objects each one has its own animation. And these objects are in a hierachy, which means the motion of the object at the bottom of the hierachy is different from its reletive motion. I want to copy the ABS motion of the bottom object to another object.

      And I have never found a DescID describing the global position of a object(such as "obj.GetMg().off" ). So I use the silly frame by frame method to copy the global position of an obj.

      I'm a noob in C4D script, maybe the problem is silly, does C4d have a DescID containing the global position data ???

      posted in Cinema 4D SDK
      Q
      q1w2ertyu
    • Problems of copying position keyframs to another obj

      There are two box in the scene.I want to copy position keyframs of one box to another. My way of doing that is copy the position to the target box frame by frame.The problem is by using "doc.SetTime" or "SetDocumentTime(doc, time)",although the time is changed ,but the position of the source box remain the value when i execute the script and never update. So the result is that the target box get a lot of same frames.
      Is there anyway to solve the problems??
      test.c4d

      Here's my code,the source is box1 and the target is box2

      import c4d
      smallbox=doc.SearchObject("box1")
      bigbox=doc.SearchObject("box2")
      
      for frame in range(60):
          doc.SetTime(c4d.BaseTime(frame,30))
          bigbox.SetMg(smallbox.GetMg())
          c4d.CallCommand(12410) # record active obj
      
      c4d.EventAdd(c4d.EVENT_ANIMATE)
              
      
      posted in Cinema 4D SDK
      Q
      q1w2ertyu