Brushstroke Tools: Initial Version #328
@ -2,7 +2,7 @@ import bpy
|
||||
from . import utils
|
||||
from . import settings as settings_py
|
||||
|
||||
def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode):
|
||||
def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode, hide_panel=False):
|
||||
|
||||
scene = bpy.context.scene
|
||||
settings = scene.BSBST_settings
|
||||
@ -35,8 +35,10 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode):
|
||||
subpanel_header, subpanel = panel.panel(k, default_closed = v.default_closed)
|
||||
subpanel_header.label(text=k)
|
||||
if display_mode != 0:
|
||||
subpanel_header.prop(s, 'hide_ui', icon_only=True, icon='REMOVE')
|
||||
draw_panel_ui_recursive(subpanel, k, mod, v.interface_items.items(), display_mode)
|
||||
col = subpanel_header.column()
|
||||
col.active = not (mod_info.hide_ui or hide_panel)
|
||||
col.prop(s, 'hide_ui', icon_only=True, icon='UNPINNED' if s.hide_ui else 'PINNED', emboss=False)
|
||||
draw_panel_ui_recursive(subpanel, k, mod, v.interface_items.items(), display_mode, s.hide_ui)
|
||||
mode_compare = []
|
||||
else:
|
||||
if v.parent.name != panel_name:
|
||||
@ -66,6 +68,7 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode):
|
||||
if s.hide_ui:
|
||||
continue
|
||||
row = panel.row(align=True)
|
||||
row.active = not (mod_info.hide_ui or hide_panel or s.hide_ui)
|
||||
|
||||
col = row.column()
|
||||
input_row = col.row(align=True)
|
||||
@ -100,7 +103,9 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode):
|
||||
if display_mode == -1:
|
||||
row.prop(s, 'link_context_type', text='', emboss=True, icon='LINKED', icon_only=True)
|
||||
if display_mode != 0:
|
||||
row.prop(s, 'hide_ui', icon_only=True, icon='REMOVE')
|
||||
col = row.column()
|
||||
col.active = not (mod_info.hide_ui or hide_panel)
|
||||
col.prop(s, 'hide_ui', icon_only=True, icon='UNPINNED' if s.hide_ui else 'PINNED', emboss=False)
|
||||
|
||||
class BSBST_UL_brushstroke_objects(bpy.types.UIList):
|
||||
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
|
||||
@ -222,7 +227,7 @@ class BSBST_PT_brushstroke_tools_panel(bpy.types.Panel):
|
||||
op = row.operator('object.modifier_remove', text='', icon='X')
|
||||
op.modifier = mod.name
|
||||
if display_mode != 0:
|
||||
mod_header.prop(mod_info, 'hide_ui', icon_only=True, icon='REMOVE')
|
||||
mod_header.prop(mod_info, 'hide_ui', icon_only=True, icon='UNPINNED' if mod_info.hide_ui else 'PINNED', emboss=False)
|
||||
|
||||
if not mod_panel:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user