fix auto-merge by prefix in autobuild
1.8.10 - fixed: node not deleted after a merge using (compo scene not referenced correctly to point node_trees)main
parent
bd7b022af8
commit
772af8cb3f
|
@ -14,6 +14,10 @@ Activate / deactivate layer opacity according to prefix
|
||||||
Activate / deactivate all masks using MA layers
|
Activate / deactivate all masks using MA layers
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
1.8.10
|
||||||
|
|
||||||
|
- fixed: node not deleted after a merge using (compo scene not referenced correctly to point node_trees)
|
||||||
|
|
||||||
1.8.9
|
1.8.9
|
||||||
|
|
||||||
- fixed: error when setting object active at the end of autobuild
|
- fixed: error when setting object active at the end of autobuild
|
||||||
|
|
|
@ -194,6 +194,11 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
|
||||||
if not node_scene:
|
if not node_scene:
|
||||||
node_scene = render_scn
|
node_scene = render_scn
|
||||||
|
|
||||||
|
## Propagate render scene and compo scene target properties on all scenes
|
||||||
|
for scn in bpy.data.scenes:
|
||||||
|
scn.gp_render_settings.node_scene = node_scene.name
|
||||||
|
scn.gp_render_settings.render_scene = render_scn.name
|
||||||
|
|
||||||
all_gp_objects = [o for o in context.scene.objects if o.type == 'GPENCIL']
|
all_gp_objects = [o for o in context.scene.objects if o.type == 'GPENCIL']
|
||||||
|
|
||||||
## Clean name and visibility
|
## Clean name and visibility
|
||||||
|
@ -276,17 +281,17 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
|
||||||
self.report({'ERROR'}, 'No render scene found')
|
self.report({'ERROR'}, 'No render scene found')
|
||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|
||||||
if self.set_active_scene == 'RENDER':
|
|
||||||
context.window.scene = render_scn
|
|
||||||
elif self.set_active_scene == 'NODES':
|
|
||||||
context.window.scene = node_scene
|
|
||||||
|
|
||||||
## Group all adjacent layer type
|
## Group all adjacent layer type
|
||||||
if self.group_all_adjacent_layer_type:
|
if self.group_all_adjacent_layer_type:
|
||||||
print('Group all adjacent layer type')
|
print('Group all adjacent layer type')
|
||||||
for ob in ob_list:
|
for ob in ob_list:
|
||||||
fn.group_adjacent_layer_prefix_rlayer(ob, excluded_prefix=self.excluded_prefix, first_name=True)
|
fn.group_adjacent_layer_prefix_rlayer(ob, excluded_prefix=self.excluded_prefix, first_name=True)
|
||||||
|
|
||||||
|
if self.set_active_scene == 'RENDER':
|
||||||
|
context.window.scene = render_scn
|
||||||
|
elif self.set_active_scene == 'NODES':
|
||||||
|
context.window.scene = node_scene
|
||||||
|
|
||||||
# bpy.ops.gp_export.render_scene_setup() # next render scene setup at once
|
# bpy.ops.gp_export.render_scene_setup() # next render scene setup at once
|
||||||
## attempt to refresh scene
|
## attempt to refresh scene
|
||||||
# render_scn.node_tree.nodes.update()
|
# render_scn.node_tree.nodes.update()
|
||||||
|
|
|
@ -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": (1, 8, 9),
|
"version": (1, 8, 10),
|
||||||
"blender": (3, 0, 0),
|
"blender": (3, 0, 0),
|
||||||
"location": "View3D",
|
"location": "View3D",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
|
5
fn.py
5
fn.py
|
@ -301,6 +301,8 @@ def get_compo_scene(scene_name=None, create=True):
|
||||||
scn.node_tree.nodes.clear()
|
scn.node_tree.nodes.clear()
|
||||||
set_settings(scn)
|
set_settings(scn)
|
||||||
scn.gp_render_settings['use_aa'] = True
|
scn.gp_render_settings['use_aa'] = True
|
||||||
|
# Set compo scene target in it's own property as well
|
||||||
|
scn.gp_render_settings.node_scene = scene_name
|
||||||
return scn
|
return scn
|
||||||
|
|
||||||
def get_render_scene(scene_name=None, create=True):
|
def get_render_scene(scene_name=None, create=True):
|
||||||
|
@ -311,6 +313,7 @@ def get_render_scene(scene_name=None, create=True):
|
||||||
render_scn = bpy.data.scenes.get(scene_name)
|
render_scn = bpy.data.scenes.get(scene_name)
|
||||||
if render_scn:
|
if render_scn:
|
||||||
return render_scn
|
return render_scn
|
||||||
|
|
||||||
if not create:
|
if not create:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -330,7 +333,7 @@ def get_render_scene(scene_name=None, create=True):
|
||||||
for ob in current.objects:
|
for ob in current.objects:
|
||||||
if ob.type in ('CAMERA', 'LIGHT'):
|
if ob.type in ('CAMERA', 'LIGHT'):
|
||||||
render_scn.collection.objects.link(ob)
|
render_scn.collection.objects.link(ob)
|
||||||
|
|
||||||
## Copy markers
|
## Copy markers
|
||||||
for marker in current.timeline_markers:
|
for marker in current.timeline_markers:
|
||||||
new_marker = render_scn.timeline_markers.new(marker.name, frame=marker.frame)
|
new_marker = render_scn.timeline_markers.new(marker.name, frame=marker.frame)
|
||||||
|
|
Loading…
Reference in New Issue