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

    Get value of keyframed property between keyframes

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 247 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

      On 29/09/2014 at 10:44, xxxxxxxx wrote:

      In After Effects I can get the value of a property on any frame even if there isn't a keyframe on that frame.

      Can I do the same thing in C4D?
      Is there a value at frame function?

      Example: keyframes on frames 1 and 100, get the value on frame 38.

      Thanks

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

        On 29/09/2014 at 11:14, xxxxxxxx wrote:

        Hi,

        take a look at the bake script I´ve posted.

        with

          
            
            
            trs = op.GetCTracks()  
              if trs != None:  
                  for tr in trs:  
                      if tr.GetDescriptionID()[0].id == c4d.ID_BASEOBJECT_POSITION:  
                          if tr.GetDescriptionID()[1].id == c4d.VECTOR_X:  
                              trpX = tr
        

        you need the specific track in this case the position track for the x axis
        and the corresponding curve

          
            
            
               
                      curve=trpX.GetCurve()  
                      val = curve.GetValue(CurrTime, fps)
        

        just insert the current frame and the frame per second value
        that´s it

        cheers
        Martin

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