Brushstroke Tools: Initial Version #328
@ -17,6 +17,7 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode):
|
||||
link_icon_dict = {bpy.types.NodeTreeInterfaceSocketObject: 'OUTLINER_OB_SURFACE',
|
||||
bpy.types.NodeTreeInterfaceSocketMaterial: 'MATERIAL'}
|
||||
|
||||
mode_compare = []
|
||||
for k, v in items:
|
||||
if type(v) == bpy.types.NodeTreeInterfacePanel:
|
||||
|
||||
@ -36,19 +37,32 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode):
|
||||
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)
|
||||
mode_compare = []
|
||||
else:
|
||||
if v.parent.name != panel_name:
|
||||
continue
|
||||
if f'{v.identifier}' not in mod.keys():
|
||||
continue
|
||||
|
||||
if not mod_info:
|
||||
continue
|
||||
|
||||
if type(v) == bpy.types.NodeTreeInterfaceSocketMenu:
|
||||
for item in mod.id_properties_ui(f'{v.identifier}').as_dict()['items']:
|
||||
if item[4] == mod[f'{v.identifier}']:
|
||||
continue
|
||||
mode_compare += [item[0]]
|
||||
|
||||
s = mod_info.socket_info.get(v.identifier)
|
||||
if not s:
|
||||
continue
|
||||
if display_mode == 0:
|
||||
comp_match = False
|
||||
for c in mode_compare:
|
||||
comp_match = c in v.name
|
||||
if comp_match:
|
||||
break
|
||||
if comp_match:
|
||||
continue
|
||||
if s.hide_ui:
|
||||
continue
|
||||
row = panel.row(align=True)
|
||||
|
Loading…
Reference in New Issue
Block a user