As rendering as animation with masking isnt working atm, see https://developer.blender.org/T59939
but it is working rendering out single frames. (but not as an image sequence or video file) i’m working on a quick and dirty workaround. so far what i have is this:
import bpy
bpy.context.scene.frame_current = 1
bpy.context.scene.render.filepath = "D:\001.jpg "
bpy.ops.render.render(write_still = 1)
bpy.context.scene.frame_current = 2
bpy.context.scene.render.filepath = "D:\002.jpg "
bpy.ops.render.render(write_still = 1)
I set the frame, set the filename and then render.
the current animation has 200 frames, so it would a lot of work to type out all the numbers following this script to get to 200. how can i automate/loop this so it ads +1 to frame and +1 to filename until i reach the end of the animation. thank you