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

    Python with MoGraph time offset

    PYTHON Development
    0
    4
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 31/01/2011 at 10:02, xxxxxxxx wrote:

      Hello,
      i wonder what i need to do, so that the mograph time offset works on my object. I create a py tag on a cube with the following code:

        
      from c4d import *  
        
      def main() :  
        time = doc.GetTime().Get()  
        i = Vector(0)  
        i.y = time*50.0       
        op.GetObject().SetAbsPos(i)  
        
      

      just to get my object moving.

      Then i put it under a null and the null under a Cloner Object. Add a Step Effector and change the time offset. But nothing happens .... 😞

      i tried it with different prioritys on my tag but still no luck. I thought the mograph time offset might shift the whole time for an object but it seems not the case. Is there an easy change to my code to make it work with the time offset of an effector?

      thanks

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 31/01/2011 at 15:39, xxxxxxxx wrote:

        Don't Vectors need 3 components, like (0, 0, 0) ? Then the .y part is specifying the 2nd of the 3 vector components.
        Also, I think you have to put c4d. in front, although that may not be necessary in a python tag.

        So your code would be :

        def main() :
            time = doc.GetTime().Get()
            i = c4d.Vector(0, 0, 0)
            i.y = time*50     
            op.GetObject().SetAbsPos(i)

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 01/02/2011 at 05:45, xxxxxxxx wrote:

          thanks for your reply, but this won't help. My code works fine for linear movement. It just won't be recognized by the time offset value :(I'd just like to now, to what the mograph effector time offset is refering to...

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 20/02/2011 at 08:54, xxxxxxxx wrote:

            What does this has to do with MoGrah ? 😕

            1 Reply Last reply Reply Quote 0
            • First post
              Last post