add timeline marker

1.8.1

- added: transfer timeline marker to render scene
- fix: scene viewport switch when using autobuild manually
main
Pullusb 2024-07-31 16:48:08 +02:00
parent fe3f0ae869
commit 8a4fc9e6f4
4 changed files with 19 additions and 1 deletions

View File

@ -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`

View File

@ -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

View File

@ -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": "",

10
fn.py
View File

@ -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
@ -325,6 +330,11 @@ def get_render_scene(scene_name=None, create=True):
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
## Clear node tree (initial view layer stuff)