parent
20ab99889d
commit
51a681b880
|
@ -14,6 +14,10 @@ Activate / deactivate layer opaticty according to prefix
|
||||||
Activate / deactivate all masks using MA layers
|
Activate / deactivate all masks using MA layers
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
0.5.8
|
||||||
|
|
||||||
|
- fix: skipping when rendering multiscene
|
||||||
|
|
||||||
0.5.7
|
0.5.7
|
||||||
|
|
||||||
- added: timeout on scene plit and autocrop border to avoid freezing blender
|
- added: timeout on scene plit and autocrop border to avoid freezing blender
|
||||||
|
|
|
@ -20,9 +20,13 @@ class GPEXP_OT_render_all_scenes(bpy.types.Operator):
|
||||||
continue
|
continue
|
||||||
if not scn.use_nodes:
|
if not scn.use_nodes:
|
||||||
continue
|
continue
|
||||||
if not [n for n in scn.node_tree.nodes if n.type == 'OUTPUT_FILE' and n.mute]:
|
outfiles = [n for n in scn.node_tree.nodes if n.type == 'OUTPUT_FILE']
|
||||||
# skip if no fileout
|
if not outfiles:
|
||||||
print(f'\n -!-> Skip {scn.name}, No output file, or all muted')
|
print(f'\n -!-> Skip {scn.name}, No output files')
|
||||||
|
continue
|
||||||
|
|
||||||
|
if all(x.mute for x in outfiles):
|
||||||
|
print(f'\n -!-> Skip {scn.name}, All output file are muted')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
print(f'\n --> Rendering {scn.name}')
|
print(f'\n --> Rendering {scn.name}')
|
||||||
|
|
|
@ -2,7 +2,7 @@ bl_info = {
|
||||||
"name": "GP Render",
|
"name": "GP Render",
|
||||||
"description": "Organise export of gp layers through compositor output",
|
"description": "Organise export of gp layers through compositor output",
|
||||||
"author": "Samuel Bernou",
|
"author": "Samuel Bernou",
|
||||||
"version": (0, 5, 7),
|
"version": (0, 5, 8),
|
||||||
"blender": (2, 93, 0),
|
"blender": (2, 93, 0),
|
||||||
"location": "View3D",
|
"location": "View3D",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
|
34
fn.py
34
fn.py
|
@ -162,23 +162,27 @@ def new_scene_from(name, src_scn=None, regen=True, crop=True, link_cam=True, lin
|
||||||
def get_render_scene():
|
def get_render_scene():
|
||||||
'''Get / Create a scene named Render'''
|
'''Get / Create a scene named Render'''
|
||||||
render_scn = bpy.data.scenes.get('Render')
|
render_scn = bpy.data.scenes.get('Render')
|
||||||
if not render_scn:
|
if render_scn:
|
||||||
current = bpy.context.scene
|
return render_scn
|
||||||
render_scn = bpy.data.scenes.new('Render')
|
|
||||||
## copy original settings over to new scene
|
current = bpy.context.scene
|
||||||
# copy_settings(current, render_scn) # BAD
|
render_scn = bpy.data.scenes.new('Render')
|
||||||
for attr in ['frame_start', 'frame_end', 'frame_current', 'camera', 'world']:
|
## copy original settings over to new scene
|
||||||
setattr(render_scn, attr, getattr(current, attr))
|
# copy_settings(current, render_scn) # BAD
|
||||||
copy_settings(current.render, render_scn.render)
|
for attr in ['frame_start', 'frame_end', 'frame_current', 'camera', 'world']:
|
||||||
|
setattr(render_scn, attr, getattr(current, attr))
|
||||||
## link cameras (and lights ?)
|
copy_settings(current.render, render_scn.render)
|
||||||
for ob in bpy.context.scene.objects:
|
|
||||||
if ob.type in ('CAMERA', 'LIGHT'):
|
## link cameras (and lights ?)
|
||||||
render_scn.collection.objects.link(ob)
|
for ob in bpy.context.scene.objects:
|
||||||
|
if ob.type in ('CAMERA', 'LIGHT'):
|
||||||
|
render_scn.collection.objects.link(ob)
|
||||||
|
|
||||||
# set adapted render settings (no AA)
|
|
||||||
set_settings(render_scn)
|
|
||||||
render_scn.use_nodes = True
|
render_scn.use_nodes = True
|
||||||
|
# TODO Clear node tree (initial view layer stuff)
|
||||||
|
# set adapted render settings (no AA)
|
||||||
|
set_settings(render_scn)
|
||||||
|
|
||||||
return render_scn
|
return render_scn
|
||||||
|
|
||||||
def get_view_layer(name, scene=None):
|
def get_view_layer(name, scene=None):
|
||||||
|
|
Loading…
Reference in New Issue