Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy;
- #I'm trying to render out each mesh in the project separately. The for loop on Scn.meshes doesen't work
- scene_number = len(bpy.data.scenes)
- for count, Scn in enumerate(bpy.data.scenes):
- print('Starting scene '+str(count+1)+' of '+str(scene_number)+': ' + Scn.name)
- for Mesh in enumerate(Scn.meshes):
- #AttributeError: 'Scene' object has no attribute 'meshes'
- for Msh in enumerate(Scn.meshes):
- msh.hide_render = True
- mesh.hide_render = False
- Scn.render.filepath = "c:/renders/"+mesh.name
- data_context = {"blend_data": bpy.context.blend_data, "scene": Scn}
- Scn.frame_end = 153
- bpy.ops.render.render(data_context, write_still = True, animation = True)
- print('Job finished')
Add Comment
Please, Sign In to add comment