Housekeeping (bug fixes)

NEW FEATURES:
- added apply shapekey to basis from Cats
  - now that pesky thing I keep going back to cats for is in Avatar Toolkit.

BUG FIXES:
- now we push armature santizers into functions where they are needed
  - this prevents the methods from mirroring changes while working, causing them to blow up when mirror mode is on
  - more changes to come for armature setting santitizers
- fixed error reporting
  - now methods when catching errors will return full error tracebacks
  - this will help make debugging and finding user issues easier.
This commit is contained in:
989onan
2025-07-10 18:44:42 -04:00
parent 89fc8bc9c8
commit 6d9f751a16
27 changed files with 663 additions and 143 deletions
@@ -13,6 +13,8 @@ from ...core.common import (
join_mesh_objects,
remove_unused_shapekeys,
identify_bones,
store_breaking_settings_armature,
restore_breaking_settings_armature,
)
from ...core.dictionaries import simplify_bonename
@@ -42,6 +44,9 @@ class AvatarToolkit_OT_MergeArmature(bpy.types.Operator):
logger.error(f"Armature not found: {merge_armature_name}")
self.report({'ERROR'}, t('MergeArmature.error.not_found', name=merge_armature_name))
return {'CANCELLED'}
#Store current armature settings that can mess us up.
data_breaking_base = store_breaking_settings_armature(base_armature)
data_breaking_merge = store_breaking_settings_armature(merge_armature)
# Remove Rigid Bodies and Joints
delete_rigidbodies_and_joints(base_armature)
@@ -70,7 +75,11 @@ class AvatarToolkit_OT_MergeArmature(bpy.types.Operator):
wm.progress_update(100)
wm.progress_end()
restore_breaking_settings_armature(base_armature, data_breaking_base)
restore_breaking_settings_armature(merge_armature, data_breaking_merge)
self.report({'INFO'}, t('MergeArmature.success'))
return {'FINISHED'}
except Exception as e: