truncate names
This commit is contained in:
@@ -6133,7 +6133,86 @@ Checking how the panel draws the migrator buttons:
|
||||
|
||||
<think><details><summary>Thought Process</summary>
|
||||
|
||||
The panel calls `row.operator("...", text="...")` without passing `icon=`. In Blender, when you use `layout.operator(operator_id, text=..., icon=...)`, the icon is drawn. The operator's `bl_icon` is used when the operator is invoked from a menu (Blender looks up the operator and uses its bl_icon), but when drawing in a custom panel </details></think>
|
||||
The panel calls `row.operator("...", text="...")` without passing `icon=`. In Blender, when you use `layout.operator(operator_id, text=..., icon=...)`, the icon is drawn. The operator's `bl_icon` is used when the operator is invoked from a menu (Blender looks up the operator and uses its bl_icon), but when drawing in a custom panel with explicit `text=`, the default behavior might not show the icon unless we pass it.
|
||||
|
||||
So the fix is to add `icon="..."` to each of the six operator calls in the panel, using the same icon names we set on the operators.
|
||||
</details></think>
|
||||
|
||||
---
|
||||
|
||||
|
||||
Adding explicit `icon=` to each panel `operator()` call so the icons draw (Blender doesn't always use the operator's `bl_icon` when `text=` is provided).
|
||||
|
||||
|
||||
---
|
||||
|
||||
<tool-use data-tool-type="write" data-tool-name="edit_file_v2">
|
||||
|
||||
<details><summary>Tool use: **edit_file_v2** • Edit file: T:\Dynamic-Link-Manager\ui\panels.py</summary>
|
||||
|
||||
</details>
|
||||
|
||||
</tool-use>
|
||||
|
||||
---
|
||||
|
||||
<think><details><summary>Thought Process</summary>
|
||||
|
||||
Done. Passing icon= in the layout.operator() call is what makes the icon show on the button in Blender's UI.
|
||||
</details></think>
|
||||
|
||||
---
|
||||
|
||||
|
||||
Updated the panel so each migrator button is drawn with an explicit `icon=...` in the `operator()` call. Blender only shows the icon on layout buttons when it’s passed there; the operator’s `bl_icon` is used in menus and search. Reload the add-on and the icons should appear on the step buttons.
|
||||
|
||||
---
|
||||
|
||||
_**User**_
|
||||
|
||||
MigShapekeys and MigNLA should have their buttons truncated to simply "NLA" and "BaseBody ShapeKeys"
|
||||
|
||||
---
|
||||
|
||||
_**Agent (model default, mode Agent)**_
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
<tool-use data-tool-type="write" data-tool-name="edit_file_v2">
|
||||
|
||||
<details><summary>Tool use: **edit_file_v2** • Edit file: T:\Dynamic-Link-Manager\ui\panels.py</summary>
|
||||
|
||||
Status: **loading**
|
||||
|
||||
</details>
|
||||
|
||||
</tool-use>
|
||||
|
||||
---
|
||||
|
||||
<tool-use data-tool-type="write" data-tool-name="edit_file_v2">
|
||||
|
||||
<details><summary>Tool use: **edit_file_v2** • Edit file: T:\Dynamic-Link-Manager\ui\panels.py</summary>
|
||||
|
||||
Status: **loading**
|
||||
|
||||
</details>
|
||||
|
||||
</tool-use>
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
+2
-2
@@ -87,12 +87,12 @@ class DLM_PT_main_panel(Panel):
|
||||
row.operator("dlm.run_character_migration", text="Run migration", icon="ARMATURE_DATA")
|
||||
row = box.row(align=True)
|
||||
row.operator("dlm.migrator_copy_attributes", text="Copy attributes", icon="COPY_ID")
|
||||
row.operator("dlm.migrator_migrate_nla", text="Migrate NLA", icon="NLA")
|
||||
row.operator("dlm.migrator_migrate_nla", text="NLA", icon="NLA")
|
||||
row.operator("dlm.migrator_custom_properties", text="Custom properties", icon="PROPERTIES")
|
||||
row = box.row(align=True)
|
||||
row.operator("dlm.migrator_bone_constraints", text="Bone constraints", icon="CONSTRAINT_BONE")
|
||||
row.operator("dlm.migrator_retarget_relations", text="Retarget relations", icon="ORIENTATION_PARENT")
|
||||
row.operator("dlm.migrator_basebody_shapekeys", text="Migrate BaseBody shapekeys", icon="SHAPEKEY_DATA")
|
||||
row.operator("dlm.migrator_basebody_shapekeys", text="BaseBody ShapeKeys", icon="SHAPEKEY_DATA")
|
||||
|
||||
# Linked Libraries: header row (always), main box only when expanded
|
||||
missing_count = sum(1 for lib in props.linked_libraries if lib.is_missing)
|
||||
|
||||
Reference in New Issue
Block a user