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 2421ffb116 - Show all commits

View File

@ -14,8 +14,12 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode, hide_pa
mod_info = mod.id_data.modifier_info.get(mod.name)
link_icon_dict = {bpy.types.NodeTreeInterfaceSocketObject: 'OUTLINER_OB_SURFACE',
bpy.types.NodeTreeInterfaceSocketMaterial: 'MATERIAL'}
icon_dict = {
bpy.types.NodeTreeInterfaceSocketObject: 'OBJECT_DATA',
bpy.types.NodeTreeInterfaceSocketMaterial: 'MATERIAL',
bpy.types.NodeTreeInterfaceSocketImage: 'IMAGE_DATA',
bpy.types.NodeTreeInterfaceSocketCollection: 'OUTLINER_COLLECTION',
}
mode_compare = []
for k, v in items:
@ -92,7 +96,11 @@ def draw_panel_ui_recursive(panel, panel_name, mod, items, display_mode, hide_pa
toggle.modifier_name = mod.name
toggle.input_name = v.identifier
else:
input_row.prop(mod, f'["{v.identifier}"]', text=k)
if type(v) in icon_dict.keys():
icon = icon_dict[type(v)]
else:
icon='NONE'
input_row.prop(mod, f'["{v.identifier}"]', text=k, icon=icon)
if type(v) in utils.linkable_sockets:
col.enabled = not s.link_context
icon = settings_py.icon_from_link_type(s.link_context_type)