2

I have a pretty basic scene where a light's power goes from 3000 to 0, keyframed at frame 0 and 80. How can I use python to retrieve the value of the 'Power' property at any specific frame?

I know I can access the object's power by using

power = obj.data.energy

but I don't know how I can make that dependent on a specific frame.

Thanks

Snoop Dog
  • 43
  • 4

1 Answers1

2

The easiest way is to change to the desired frame and access the property normally.

frame = 24
bpy.context.scene.frame_set(frame)
power = obj.data.energy  # value on frame 24
scurest
  • 10,349
  • 13
  • 31