Exclude GP using is_background in autobuild by default

1.8.15

- changed: exclude background GP by default in autobuild (`is_background` is a custom property set on some GP by the addon "Background Plane Manager")
- added: autobuild bool argument `exclude_background_gp` (Default to True).
main
pullusb 2025-04-02 15:55:34 +02:00
parent 52e1f7ad0e
commit af2d8e1ad4
2 changed files with 13 additions and 0 deletions

View File

@ -14,6 +14,12 @@ Activate / deactivate layer opacity according to prefix
Activate / deactivate all masks using MA layers
-->
1.8.15
- changed: exclude background GP by default in autobuild (`is_background` is a custom property set on some GP by the addon "Background Plane Manager")
- added: autobuild bool argument `exclude_background_gp` (Default to True).
- fixed: clean name in file output gernerator
1.8.14
- fixed: error when trying remove a viewlayer

View File

@ -129,6 +129,9 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
add_preview : BoolProperty(name='Add Preview', default=True,
description='Create preview with stacked alpha over on render layers')
exclude_background_gp : BoolProperty(name='Exclude Background GP', default=True,
description='Exclude GP object with boolean custom property "is_background" at True (created by "Background Plane Manager" addon)')
# File output templates
base_path : bpy.props.StringProperty(name='Base Path', default='', options={'SKIP_SAVE'})
file_slot : bpy.props.StringProperty(name='File Slot', default='', options={'SKIP_SAVE'})
@ -201,6 +204,10 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
all_gp_objects = [o for o in context.scene.objects if o.type == 'GPENCIL']
## Exclude Background GP (is_background is a custom property set by the addon "Background Plane Manager")
if self.exclude_background_gp:
all_gp_objects = [o for o in all_gp_objects if not o.get('is_background')]
## Clean name and visibility
if self.clean_name_and_visibility:
for o in all_gp_objects: