Brushstroke Tools: Initial Version #328

Merged
Simon Thommes merged 229 commits from SimonThommes/blender-studio-tools:brushstroke_tools-initial-version into main 2024-11-06 15:03:47 +01:00
Showing only changes of commit 4f28a192f4 - Show all commits

View File

@ -21,6 +21,12 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode, hide_pa
bpy.types.NodeTreeInterfaceSocketCollection: 'OUTLINER_COLLECTION',
}
data_dict = {
bpy.types.NodeTreeInterfaceSocketMaterial: 'materials',
bpy.types.NodeTreeInterfaceSocketImage: 'images',
bpy.types.NodeTreeInterfaceSocketCollection: 'collections',
}
mode_compare = []
for k, v in items:
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)]
else:
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)
if type(v) in utils.linkable_sockets:
col.enabled = not s.link_context