namespace improvement

1.5.8

- feat: Namespace improvement:
  - new suffixes list that generate suffix buttons
  - dynamic layer name field that show active (msgbus)
  - possible to disable the panel with an option
This commit is contained in:
Pullusb
2021-07-20 18:53:39 +02:00
parent 9612c84396
commit 212436c451
5 changed files with 137 additions and 44 deletions
+18 -1
View File
@@ -234,6 +234,17 @@ class GPTB_prefs(bpy.types.AddonPreferences):
description="List of prefixes (two capital letters) available for layers(ex: AN,CO,CL)",
default="", maxlen=0)
suffixes : StringProperty(
name="Layers Suffixes",
description="List of suffixes (two capital letters) available for layers(ex: OL,UL)",
default="", maxlen=0)
show_prefix_buttons : BoolProperty(
name="Show Prefix Buttons",
description="Show prefix and suffix buttons above layer stack",
default=False,
)
## Playblast prefs
playblast_auto_play : BoolProperty(
name="Playblast auto play",
@@ -364,7 +375,10 @@ class GPTB_prefs(bpy.types.AddonPreferences):
subbox = box.box()
subbox.label(text='Namespace:')
subbox.prop(self, 'separator')
subbox.prop(self, 'prefixes')
subbox.prop(self, 'show_prefix_buttons', text='Use Prefixes Toggles')
if self.show_prefix_buttons:
subbox.prop(self, 'prefixes')
subbox.prop(self, 'suffixes')
### TODO add render settings
@@ -504,6 +518,9 @@ def set_env_properties():
prefix_list = os.getenv('PREFIXES')
prefs.prefixes = prefix_list if prefix_list else prefs.prefixes
suffix_list = os.getenv('SUFFIXES')
prefs.suffixes = suffix_list if suffix_list else prefs.suffixes
separator = os.getenv('SEPARATOR')
prefs.separator = separator if separator else prefs.separator