0
$\begingroup$

I have a smoke animation that is 50 frames long and I want to render only the last frame as an image.

I tried:

bpy.context.scene.frame_set(50)
bpy.ops.render.render(write_still=True)

But this doesn't render the fiftieth frame of the animation properly. The smoke animation doesn't update to what it should look like at frame 50 and instead stays at its frame 0 state

$\endgroup$
2
  • $\begingroup$ What exactly do you mean by "not properly"? What doesn't look/work like it should? $\endgroup$ – Robert Gützkow Jul 25 '19 at 16:35
  • $\begingroup$ edited my question to address yours $\endgroup$ – Allen Chen Jul 25 '19 at 16:53
0
$\begingroup$

I managed to solve this by:

hbpy.data.scenes['Scene'].render.filepath = "FilePath"
frame_start = 1
frame_end = 50
bpy.context.scene.frame_set(frame_start)
for frame in range(frame_start, frame_end+1):
    bpy.context.scene.frame_set(frame)
    if frame==frame_end:
        bpy.ops.render.render(write_still=True)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.