Brushstroke Tools: Initial Version #328
@ -21,6 +21,12 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode, hide_pa
|
|||||||
bpy.types.NodeTreeInterfaceSocketCollection: 'OUTLINER_COLLECTION',
|
bpy.types.NodeTreeInterfaceSocketCollection: 'OUTLINER_COLLECTION',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data_dict = {
|
||||||
|
bpy.types.NodeTreeInterfaceSocketMaterial: 'materials',
|
||||||
|
bpy.types.NodeTreeInterfaceSocketImage: 'images',
|
||||||
|
bpy.types.NodeTreeInterfaceSocketCollection: 'collections',
|
||||||
|
}
|
||||||
|
|
||||||
mode_compare = []
|
mode_compare = []
|
||||||
for k, v in items:
|
for k, v in items:
|
||||||
if type(v) == bpy.types.NodeTreeInterfacePanel:
|
if type(v) == bpy.types.NodeTreeInterfacePanel:
|
||||||
@ -100,6 +106,9 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode, hide_pa
|
|||||||
icon = icon_dict[type(v)]
|
icon = icon_dict[type(v)]
|
||||||
else:
|
else:
|
||||||
icon='NONE'
|
icon='NONE'
|
||||||
|
if type(v) in data_dict.keys():
|
||||||
|
input_row.prop_search(mod, f'["{v.identifier}"]', bpy.data, data_dict[type(v)], text=k, icon=icon)
|
||||||
|
else:
|
||||||
input_row.prop(mod, f'["{v.identifier}"]', text=k, icon=icon)
|
input_row.prop(mod, f'["{v.identifier}"]', text=k, icon=icon)
|
||||||
if type(v) in utils.linkable_sockets:
|
if type(v) in utils.linkable_sockets:
|
||||||
col.enabled = not s.link_context
|
col.enabled = not s.link_context
|
||||||
|
Loading…
Reference in New Issue
Block a user