Python with MoGraph time offset



  • 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



  • 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)



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



  • 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 ? 😕


Log in to reply