diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ff707c..d88ed80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ Activate / deactivate layer opacity according to prefix 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 - fixed: error when setting object active at the end of autobuild diff --git a/OP_auto_build.py b/OP_auto_build.py index 0ae7206..2ccdf80 100644 --- a/OP_auto_build.py +++ b/OP_auto_build.py @@ -194,6 +194,11 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator): if not node_scene: 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'] ## Clean name and visibility @@ -276,17 +281,17 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator): self.report({'ERROR'}, 'No render scene found') 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 if self.group_all_adjacent_layer_type: print('Group all adjacent layer type') for ob in ob_list: 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 ## attempt to refresh scene # render_scn.node_tree.nodes.update() diff --git a/__init__.py b/__init__.py index eb7f395..d91f8d2 100644 --- a/__init__.py +++ b/__init__.py @@ -2,7 +2,7 @@ bl_info = { "name": "GP Render", "description": "Organise export of gp layers through compositor output", "author": "Samuel Bernou", - "version": (1, 8, 9), + "version": (1, 8, 10), "blender": (3, 0, 0), "location": "View3D", "warning": "", diff --git a/fn.py b/fn.py index 16e824f..9f1598c 100644 --- a/fn.py +++ b/fn.py @@ -301,6 +301,8 @@ def get_compo_scene(scene_name=None, create=True): scn.node_tree.nodes.clear() set_settings(scn) 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 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) if render_scn: return render_scn + if not create: return @@ -330,7 +333,7 @@ def get_render_scene(scene_name=None, create=True): for ob in current.objects: if ob.type in ('CAMERA', 'LIGHT'): render_scn.collection.objects.link(ob) - + ## Copy markers for marker in current.timeline_markers: new_marker = render_scn.timeline_markers.new(marker.name, frame=marker.frame)