Brushstroke Tools: Initial Version #328
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user