Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Login

    Frame in BaseTime

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 213 Views
    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 Offline
      Helper
      last edited by

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

      On 23/08/2010 at 17:16, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;  C++  ;

      ---------
      Hello everyone,
      i'm not sure if this is the right forum, because my question is python (py4d) related, but i think the c++ answer would help me too. I'm playing around in the timeline and got stuck with setting keys. I'm not sure how the BaseTime behaves. How can I get a BaseTime to a specified framenuber? For example what would be the BaseTime of Frame 25? Or how can i create a BaseTime set to 2 seconds?
      i get my key with

      ctracks = obj.GetCTracks()
        for i,o in enumerate(ctracks) : 
          c=o.GetCurve()     
          cnt=  c.GetKeyCount()
          print o.GetName(),i,"count:",cnt
          for p in xrange(cnt) :
             key = c.GetKey(p)
             key.SetTime(...) #<- and here is the problem. I really have no idea what to put in there to set the keyframe to Frame 25 ... or 2 seconds ...

      any ideas?

      mogwaii

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

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

        On 23/08/2010 at 17:56, xxxxxxxx wrote:

        *cough*
        Just right after posting i discovered how to do it. So don't bother anymore.
        here FYI:

        for i,o in enumerate(ctracks) : 
              c=o.GetCurve()     
              cnt=  c.GetKeyCount()
              print o.GetName(),i,"count:",cnt
              for p in xrange(cnt) :
                key = c.GetKey(p)
                if p == 2:
                  key.SetTime(c,BaseTime(6)) #sets key to 6 seconds
                  #print #BaseTime(6).GetFrame(doc.GetFps()) returns frame corresponding to 6 seconds

        ..now i just need the key to show an update ... it worked one time, than stopped.
        Quite mysterious.

        cheers
        mogwaii

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