Compare commits
No commits in common. "e97a86b62443a953bdeef65caf40b846cf2889db" and "1078e5d8584bd2d054a81519bfe19168e8f643f4" have entirely different histories.
e97a86b624
...
1078e5d858
|
@ -13,10 +13,6 @@ if duplicate, need to "connect" with namespace ('_duprender') or something
|
||||||
Activate / deactivate layer opacity according to prefix
|
Activate / deactivate layer opacity according to prefix
|
||||||
Activate / deactivate all masks using MA layers
|
Activate / deactivate all masks using MA layers
|
||||||
-->
|
-->
|
||||||
1.8.2
|
|
||||||
|
|
||||||
- added: `Reset Layer State` (Check layer) in Autobuild
|
|
||||||
- added: environment variable `GP_RENDER_LAYER_GROUP_PATTERN` for layer merging regex pattern
|
|
||||||
|
|
||||||
1.8.1
|
1.8.1
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
|
||||||
description='Clean material stack. i.e: Replace "mat.001" in material stack if "mat" exists and has same color')
|
description='Clean material stack. i.e: Replace "mat.001" in material stack if "mat" exists and has same color')
|
||||||
|
|
||||||
prefix_filter : StringProperty(name='Prefix Filter', default='CO, CU, FX, TO', # , MA # exclude MA if mask are applied
|
prefix_filter : StringProperty(name='Prefix Filter', default='CO, CU, FX, TO', # , MA # exclude MA if mask are applied
|
||||||
description='Comma separated prefix to render, Layer with those prefix will be made visible')
|
description='Comma separated prefix to render. Set the other prefix and non-prefixed layer to exluded viewlayer')
|
||||||
|
|
||||||
set_layers_colors : BoolProperty(name='Set Layers Colors', default=True,
|
set_layers_colors : BoolProperty(name='Set Layers Colors', default=True,
|
||||||
description='Set colors for on layers according to prefix (hadrcoded color set)')
|
description='Set colors for on layers according to prefix (hadrcoded color set)')
|
||||||
|
@ -102,9 +102,6 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
|
||||||
export_layer_infos : BoolProperty(name='Export Layer Infos', default=True,
|
export_layer_infos : BoolProperty(name='Export Layer Infos', default=True,
|
||||||
description='Export layers infos to a Json file')
|
description='Export layers infos to a Json file')
|
||||||
|
|
||||||
reset_layers_state : BoolProperty(name='Reset Layer State', default=True,
|
|
||||||
description='Set layer opacity to 100%, Disable use light on all layer, set regular blend mode, hide invisible')
|
|
||||||
|
|
||||||
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')
|
||||||
|
|
||||||
|
@ -153,7 +150,6 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
|
||||||
col.prop(self, 'trigger_rename_lowercase')
|
col.prop(self, 'trigger_rename_lowercase')
|
||||||
col.prop(self, 'trigger_renumber_by_distance')
|
col.prop(self, 'trigger_renumber_by_distance')
|
||||||
col.prop(self, 'export_layer_infos')
|
col.prop(self, 'export_layer_infos')
|
||||||
col.prop(self, 'reset_layers_state')
|
|
||||||
|
|
||||||
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')
|
||||||
|
@ -253,10 +249,6 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
|
||||||
print('Export layer infos (skip if json already exists)')
|
print('Export layer infos (skip if json already exists)')
|
||||||
bpy.ops.gp.export_infos_for_compo('INVOKE_DEFAULT', skip_check=True)
|
bpy.ops.gp.export_infos_for_compo('INVOKE_DEFAULT', skip_check=True)
|
||||||
|
|
||||||
## Reset layer states -> 100% opacity (except mask layer 'MA' by default), remove use light, set default blend mode, hide material named "invisible".
|
|
||||||
if self.reset_layers_state:
|
|
||||||
bpy.ops.gp.layers_state()
|
|
||||||
|
|
||||||
## Set GP object data to single user (Individual viewlayers)
|
## Set GP object data to single user (Individual viewlayers)
|
||||||
if self.make_gp_single_user:
|
if self.make_gp_single_user:
|
||||||
for o in ob_list:
|
for o in ob_list:
|
||||||
|
|
|
@ -6,8 +6,6 @@ Organise export of gp layers through compositor output
|
||||||
|
|
||||||
`FILE_FORMAT` : Define file_format used for output. If not specified, use `OPEN_EXR_MULTILAYER` (set `OPEN_EXR` for separate sequences)
|
`FILE_FORMAT` : Define file_format used for output. If not specified, use `OPEN_EXR_MULTILAYER` (set `OPEN_EXR` for separate sequences)
|
||||||
|
|
||||||
`GP_RENDER_MERGE_PATTERN` : Regex pattern for GP layer group merge. If not specified, pattern is `^([A-Z]{2})_` to match gp_toolbox two-capital-letter prefix system)
|
|
||||||
|
|
||||||
|
|
||||||
### Notable operator arguments for automatisation
|
### Notable operator arguments for automatisation
|
||||||
|
|
||||||
|
|
9
fn.py
9
fn.py
|
@ -1,14 +1,13 @@
|
||||||
|
from typing import Coroutine
|
||||||
import bpy
|
import bpy
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import json
|
|
||||||
|
|
||||||
from mathutils import Vector
|
from mathutils import Vector
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from itertools import groupby
|
|
||||||
from math import isclose
|
from math import isclose
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from time import time
|
from time import time
|
||||||
|
import json
|
||||||
|
|
||||||
from . constant import RD_SCENE_NAME
|
from . constant import RD_SCENE_NAME
|
||||||
|
|
||||||
|
@ -590,8 +589,8 @@ def group_adjacent_layer_prefix_rlayer(ob, excluded_prefix=[], first_name=True):
|
||||||
:first_name: Keep the viewlayer of the bottom layer in group, else last
|
:first_name: Keep the viewlayer of the bottom layer in group, else last
|
||||||
'''
|
'''
|
||||||
|
|
||||||
pattern = os.environ.get('GP_RENDER_MERGE_PATTERN', r'^([A-Z]{2})_')
|
from itertools import groupby
|
||||||
re_prefix = re.compile(pattern)
|
re_prefix = re.compile(r'^([A-Z]{2})_')
|
||||||
|
|
||||||
if isinstance(excluded_prefix, str):
|
if isinstance(excluded_prefix, str):
|
||||||
excluded_prefix = [p.strip() for p in excluded_prefix.split(',')]
|
excluded_prefix = [p.strip() for p in excluded_prefix.split(',')]
|
||||||
|
|
Loading…
Reference in New Issue