Brushstroke Tools: Initial Version #328

Merged
Simon Thommes merged 229 commits from SimonThommes/blender-studio-tools:brushstroke_tools-initial-version into main 2024-11-06 15:03:47 +01:00
2 changed files with 23 additions and 21 deletions
Showing only changes of commit 7577c20668 - Show all commits

View File

@ -445,7 +445,7 @@ class BSBST_PT_brushstroke_tools_panel(bpy.types.Panel):
continue
if not mod.type == 'NODES':
mod_panel.label(text="Only 'Nodes' modifiers supported for preset interface")
mod_panel.label(text="Only 'Nodes' modifiers supported")
continue
# show settings for nodes modifiers

View File

@ -78,15 +78,17 @@ def find_context_brushstrokes(dummy):
@persistent
def refresh_preset(dummy):
settings = bpy.context.scene.BSBST_settings
context = bpy.context
settings = context.scene.BSBST_settings
if not settings:
return
if not settings.preset_object:
return
for mod in settings.preset_object.modifiers:
mod_info = settings.preset_object.modifier_info.get(mod.name)
for ob in [settings.preset_object, get_active_context_brushstrokes_object(context)]:
if not ob:
continue
for mod in ob.modifiers:
mod_info = ob.modifier_info.get(mod.name)
if not mod_info:
mod_info = settings.preset_object.modifier_info.add()
mod_info = ob.modifier_info.add()
mod_info.name = mod.name
if not mod.type == 'NODES':
continue