Brushstroke Tools: Initial Version #328
@ -108,6 +108,18 @@ def set_brushstroke_name(self, value):
|
|||||||
flow_ob.name = flow_name
|
flow_ob.name = flow_name
|
||||||
flow_ob.data.name = flow_name
|
flow_ob.data.name = flow_name
|
||||||
|
|
||||||
|
def get_modifier_name(self):
|
||||||
|
return self["name"]
|
||||||
|
|
||||||
|
def set_modifier_name(self, value):
|
||||||
|
prev_name = self.get('name')
|
||||||
|
if not prev_name:
|
||||||
|
self["name"] = value
|
||||||
|
return
|
||||||
|
ob = self.id_data.modifiers.get(prev_name)
|
||||||
|
ob.name = value
|
||||||
|
self["name"] = ob.name
|
||||||
|
|
||||||
def get_hide_viewport_base(self):
|
def get_hide_viewport_base(self):
|
||||||
return self["hide_viewport_base"]
|
return self["hide_viewport_base"]
|
||||||
|
|
||||||
@ -178,7 +190,7 @@ class BSBST_socket_info(bpy.types.PropertyGroup):
|
|||||||
hide_ui: bpy.props.BoolProperty(default=False)
|
hide_ui: bpy.props.BoolProperty(default=False)
|
||||||
|
|
||||||
class BSBST_modifier_info(bpy.types.PropertyGroup):
|
class BSBST_modifier_info(bpy.types.PropertyGroup):
|
||||||
name: bpy.props.StringProperty(default='')
|
name: bpy.props.StringProperty(default='', get=get_modifier_name, set=set_modifier_name)
|
||||||
hide_ui: bpy.props.BoolProperty(default=False)
|
hide_ui: bpy.props.BoolProperty(default=False)
|
||||||
socket_info: bpy.props.CollectionProperty(type=BSBST_socket_info)
|
socket_info: bpy.props.CollectionProperty(type=BSBST_socket_info)
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ class BSBST_PT_brushstroke_tools_panel(bpy.types.Panel):
|
|||||||
mod_header, mod_panel = style_panel.panel(mod.name, default_closed = False)
|
mod_header, mod_panel = style_panel.panel(mod.name, default_closed = False)
|
||||||
row = mod_header.row(align=True)
|
row = mod_header.row(align=True)
|
||||||
row.label(text='', icon='GEOMETRY_NODES')
|
row.label(text='', icon='GEOMETRY_NODES')
|
||||||
row.prop(mod, 'name', text='', emboss=False)
|
row.prop(mod_info, 'name', text='', emboss=False)
|
||||||
|
|
||||||
if display_mode != 0:
|
if display_mode != 0:
|
||||||
mod_header.prop(mod_info, 'hide_ui', icon_only=True, icon='UNPINNED' if mod_info.hide_ui else 'PINNED', emboss=False)
|
mod_header.prop(mod_info, 'hide_ui', icon_only=True, icon='UNPINNED' if mod_info.hide_ui else 'PINNED', emboss=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user