TylerGubala / blenderpy

Blender as a python module with easy-install
GNU General Public License v3.0
314 stars 30 forks source link

bpy.types.Scene.render_frame #67

Open mecampbellsoup opened 3 years ago

mecampbellsoup commented 3 years ago

Is your feature request related to a problem? Please describe.

It is possible to pass a comma-separate list of frames when invoking Blender via CLI, e.g.:

image

Currently we are setting the scene's start and stop frames via:

https://docs.blender.org/api/current/bpy.types.Scene.html#bpy.types.Scene.frame_start https://docs.blender.org/api/current/bpy.types.Scene.html#bpy.types.Scene.frame_end

scene = bpy.data.scenes[job['scene']]
scene.frame_start = int(os.getenv('START'))
scene.frame_end = int(os.getenv('STOP'))

Describe the solution you'd like

It would be great if we could just pass a list of comma-separated frame positions to be rendered to the scene via bpy, e.g.:

scene = bpy.data.scenes[job['scene']]
scene.frames = os.getenv('FRAMES')

This would also match up with the CLI API as shown above.

mecampbellsoup commented 3 years ago

@TylerGubala I was just thinking, it might be reasonable to name the attribute bpy.types.Scene.render_frame to be consistent w/ the CLI API.