1
$\begingroup$

Say I want to render every other frame in the first minute and only every third frame in the second etc?

Edit: I need the output to be one video. Best way for me would be to generate an array of frame numbers and use only them in the rendered video.

$\endgroup$
2

1 Answer 1

1
$\begingroup$

I think it should work like this

import bpy
#configure the startframe, endframe and the step size
render_list = [
#startframe, stopframe, step
[0, 50, 1] # Frame 0 to 50 with stepsize 1
[50, 100, 2] # Frame 50 to 100 with stepsize 2
]
for config in render_list:
     bpy.context.scene.frame_start = config[0]
     bpy.context.scene.frame_end = config[1]
     bpy.context.scene.frame_step = config[2]
     bpy.ops.render.render(animation = True) #execute animation with current settings
$\endgroup$
6
  • $\begingroup$ I got an error - 'scene' object has no attribute 'frame_stop'. $\endgroup$
    – OMGsh
    Commented Jun 17, 2019 at 21:35
  • $\begingroup$ Did this on blender 2.8, in 2.79 it is frame_end $\endgroup$ Commented Jun 17, 2019 at 21:39
  • $\begingroup$ Tested against latest 2.8x, there is nothing like a frame_stop property so the code should be equal for both versions @miceterminator $\endgroup$
    – brockmann
    Commented Jun 18, 2019 at 8:38
  • $\begingroup$ Yep I must have screwed this up somehow. I'll change the answer $\endgroup$ Commented Jun 18, 2019 at 9:27
  • $\begingroup$ Now I got two videos, one for each brackets rule. $\endgroup$
    – OMGsh
    Commented Jun 18, 2019 at 12:22

You must log in to answer this question.

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