2
$\begingroup$

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

$\endgroup$

1 Answer 1

2
$\begingroup$

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
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .