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
|
||||
-->
|
||||
|
||||
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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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": "",
|
||||
|
|
3
fn.py
3
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue