autobuild scene switch choice
1.7.4 - removed: Restriction to use default scene "Scene" - added: autobuild choice to change active scene: - `NONE` : No change - `RENDER`: Go to render scene containing GP - `NODES` : Go to compo scene scene holding nodesmain
parent
270b0fb20e
commit
332f8594ea
|
@ -17,6 +17,10 @@ Activate / deactivate all masks using MA layers
|
||||||
1.7.4
|
1.7.4
|
||||||
|
|
||||||
- removed: Restriction to use default scene "Scene"
|
- removed: Restriction to use default scene "Scene"
|
||||||
|
- added: autobuild choice to change active scene:
|
||||||
|
- `NONE` : No change
|
||||||
|
- `RENDER`: Go to render scene containing GP
|
||||||
|
- `NODES` : Go to compo scene scene holding nodes
|
||||||
|
|
||||||
1.7.3
|
1.7.3
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import bpy
|
||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from . import gen_vlayer, fn
|
from . import gen_vlayer, fn
|
||||||
from bpy.props import (BoolProperty, StringProperty)
|
from bpy.props import (BoolProperty, StringProperty, EnumProperty)
|
||||||
|
|
||||||
|
|
||||||
def batch_setup_render_scene(context=None, render_scn=None, node_scene=None, preview=True):
|
def batch_setup_render_scene(context=None, render_scn=None, node_scene=None, preview=True):
|
||||||
|
@ -105,6 +105,14 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
|
||||||
group_all_adjacent_layer_type : BoolProperty(name='Group All Adjacent Layer Type', default=False,
|
group_all_adjacent_layer_type : BoolProperty(name='Group All Adjacent Layer Type', default=False,
|
||||||
description='Fuse output Viewlayer according to adjacent Prefix in layer stack')
|
description='Fuse output Viewlayer according to adjacent Prefix in layer stack')
|
||||||
|
|
||||||
|
set_active_scene : EnumProperty(name='Set Active Scene', default='NODES',
|
||||||
|
items=(
|
||||||
|
('NONE', 'No change', 'Do not set active scene'),
|
||||||
|
('RENDER', 'Render Scene', 'Set Render Scene as active'),
|
||||||
|
('NODES', 'Nodes Scene', 'Set compositing Scene as active (render scene if same scene used)'),
|
||||||
|
),
|
||||||
|
description='Set the active scene')
|
||||||
|
|
||||||
change_to_gp_workspace : BoolProperty(name='Change To Gp Workspace', default=True,
|
change_to_gp_workspace : BoolProperty(name='Change To Gp Workspace', default=True,
|
||||||
description='Switch to "GP Render" workspace shipped with addon')
|
description='Switch to "GP Render" workspace shipped with addon')
|
||||||
|
|
||||||
|
@ -125,7 +133,7 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
|
||||||
|
|
||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
# return self.execute(context)
|
# return self.execute(context)
|
||||||
return context.window_manager.invoke_props_dialog(self)
|
return context.window_manager.invoke_props_dialog(self, width=380)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -146,6 +154,7 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
|
||||||
col.label(text='Send prefixed layer to render scene (except excluded)')
|
col.label(text='Send prefixed layer to render scene (except excluded)')
|
||||||
col.prop(self, 'excluded_prefix', text='Excluded')
|
col.prop(self, 'excluded_prefix', text='Excluded')
|
||||||
|
|
||||||
|
col.prop(self, 'set_active_scene')
|
||||||
col.prop(self, 'group_all_adjacent_layer_type')
|
col.prop(self, 'group_all_adjacent_layer_type')
|
||||||
col.prop(self, 'change_to_gp_workspace')
|
col.prop(self, 'change_to_gp_workspace')
|
||||||
col.prop(self, 'batch_setup_render_scene')
|
col.prop(self, 'batch_setup_render_scene')
|
||||||
|
@ -256,7 +265,10 @@ 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'}
|
||||||
|
|
||||||
context.window.scene = render_scn
|
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:
|
||||||
|
|
|
@ -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, 7, 3),
|
"version": (1, 7, 4),
|
||||||
"blender": (3, 0, 0),
|
"blender": (3, 0, 0),
|
||||||
"location": "View3D",
|
"location": "View3D",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
|
Loading…
Reference in New Issue