Get value of keyframed property between keyframes

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

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