bpy_struct.__new__(struct): expected a single argument by refactoring logic into standalone functions instead of trying to instantiate operator classes directly.Optimized the renaming feature to prompt users to turn off X-Axis Mirror mode when the model is in X-Axis Mirror mode.
Button Display:All buttons are always visible.
Buttons are disabled (grayed out) when not in Edit Mode (EDIT_ARMATURE) or Pose Mode (POSE).
Added “Selected to Active Name” button to rename selected bone to active bone’s name.
Added “Active to Selected Name” button to rename active bone to selected bone’s name.
Added the ability to align bones in pose mode. Note: Alignment may not work well when bones are of different lengths.
Performance Optimization:Optimized bone name matching using a dictionary (selected_bone_dict), reducing matching time complexity from O(n*m) to O(n), significantly improving performance for large armatures. Rewrote get_sorted_bones function to use non-recursive topological sorting (DFS), improving efficiency for complex armatures and avoiding stack overflow.
Code Refactoring:Moved compare_names function to module level, shared by both operator classes (BONEALIGNER_OT_AlignActiveToSelected and BONEALIGNER_OT_AlignSelectedToActive), reducing code duplication. Refactored align_bones method to consolidate active_to_selected cases, minimizing redundant code.
UI Improvements:Added a prompt label in the UI panel: "Select two armatures to align their bones," clarifying user requirements. Optimized poll method to ensure the panel and buttons are only visible in Edit Mode with at least two armatures selected.
*Tested, version 3.6 can also run this plugin.
Fix wrong manifest content
Initial submission