From 8a4fc9e6f418cef1b24b8ed1465d758c87501233 Mon Sep 17 00:00:00 2001 From: Pullusb Date: Wed, 31 Jul 2024 16:48:08 +0200 Subject: [PATCH 1/2] add timeline marker 1.8.1 - added: transfer timeline marker to render scene - fix: scene viewport switch when using autobuild manually --- CHANGELOG.md | 5 +++++ OP_auto_build.py | 3 +++ __init__.py | 2 +- fn.py | 10 ++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index def6b62..c903911 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,11 @@ Activate / deactivate layer opacity according to prefix Activate / deactivate all masks using MA layers --> +1.8.1 + +- added: transfer timeline marker to render scene +- fix: scene viewport switch when using autobuild manually + 1.8.0 - added: Allow to rename output on the fly using `connect selection to output` diff --git a/OP_auto_build.py b/OP_auto_build.py index c2248c6..620a2da 100644 --- a/OP_auto_build.py +++ b/OP_auto_build.py @@ -177,6 +177,9 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator): self.report({'ERROR'}, f'Abort, scene "{self.scene}" already exists') return {'CANCELLED'} render_scn = fn.get_render_scene(scene_name=self.scene, create=True) + else: + ## Create render scene with default name + render_scn = fn.get_render_scene(create=True) if self.node_scene: node_scene = fn.get_compo_scene(scene_name=self.node_scene, create=True) # create if not exists diff --git a/__init__.py b/__init__.py index 783cc63..e608e74 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, 0), + "version": (1, 8, 1), "blender": (3, 0, 0), "location": "View3D", "warning": "", diff --git a/fn.py b/fn.py index 59d43ef..b1fde7e 100644 --- a/fn.py +++ b/fn.py @@ -289,6 +289,11 @@ def get_compo_scene(scene_name=None, create=True): setattr(scn, attr, getattr(current, attr)) copy_settings(current.render, scn.render) + ## Copy markers + for marker in current.timeline_markers: + new_marker = scn.timeline_markers.new(marker.name, frame=marker.frame) + new_marker.camera = marker.camera + scn.use_nodes = True ## Clear node tree @@ -324,6 +329,11 @@ 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) + new_marker.camera = marker.camera render_scn.use_nodes = True From 1078e5d8584bd2d054a81519bfe19168e8f643f4 Mon Sep 17 00:00:00 2001 From: Pullusb Date: Wed, 31 Jul 2024 17:07:16 +0200 Subject: [PATCH 2/2] disable copy timeline marker from node compo scene --- fn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fn.py b/fn.py index b1fde7e..0972514 100644 --- a/fn.py +++ b/fn.py @@ -290,9 +290,9 @@ def get_compo_scene(scene_name=None, create=True): copy_settings(current.render, scn.render) ## Copy markers - for marker in current.timeline_markers: - new_marker = scn.timeline_markers.new(marker.name, frame=marker.frame) - new_marker.camera = marker.camera + # for marker in current.timeline_markers: + # new_marker = scn.timeline_markers.new(marker.name, frame=marker.frame) + # new_marker.camera = marker.camera scn.use_nodes = True