TransWikia.com

Blender python - Get path animation value at custom (previous) frame

Blender Asked by Jan Hrodek on November 25, 2021

I need to get value Path animation (‘eval_time’) of my [‘Track_02’] curve from previous frame to calculate acceleration. Therefore on the panel there would be values of ‘current_frame’ and the previous frame (‘current_frame-1’, if correct) that I can take into calculation. Basicaly display ‘eval_time’ values on the current frame (which is not a problem) and the previous one.
I’m not sure how the last line would go…

Thank you for your help, guys!

Code I used:

    def draw (self, context):
        layout = self.layout
        crv = bpy.data.curves['Track_02']
        
        row = layout.row()
        row.label(text = "Current frame")
        row.label(icon = 'TRIA_RIGHT')
        row.operator("object.simple_operator")
        row.prop(crv, 'eval_time')
        
        row = layout.row()
        row.label(text = "Previous frame")
        print(crv, 'eval_time', scene.frame_current-1)```

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP