fix more error logging errors

This commit is contained in:
989onan
2025-05-11 12:14:47 -04:00
parent 9a84cf52b5
commit 316b125fa8
15 changed files with 38 additions and 24 deletions
+3 -2
View File
@@ -1,3 +1,4 @@
import traceback
import bpy
import numpy as np
from bpy.types import Operator, Context
@@ -44,7 +45,7 @@ class AvatarToolkit_OT_ApplyTransforms(Operator):
except Exception as e:
logger.error(f"Failed to apply transforms:", exception=e)
self.report({'ERROR'}, str(e))
self.report({'ERROR'}, traceback.format_exc())
return {'CANCELLED'}
class AvatarToolkit_OT_CleanShapekeys(Operator):
@@ -88,5 +89,5 @@ class AvatarToolkit_OT_CleanShapekeys(Operator):
except Exception as e:
logger.error(f"Failed to clean shape keys:", exception=e)
self.report({'ERROR'}, str(e))
self.report({'ERROR'}, traceback.format_exc())
return {'CANCELLED'}
+2 -1
View File
@@ -1,3 +1,4 @@
import traceback
import bpy
import re
from bpy.types import Operator, Context, EditBone, Object, Armature, Mesh
@@ -99,7 +100,7 @@ class AvatarToolKit_OT_CreateDigitigradeLegs(Operator):
return True
except Exception as e:
self.report({'ERROR'}, t("Tools.digitigrade_error", error=str(e)))
self.report({'ERROR'}, t("Tools.digitigrade_error", error=traceback.format_exc()))
return False
def execute(self, context: Context) -> set[str]:
+4 -3
View File
@@ -1,3 +1,4 @@
import traceback
import bpy
import math
from typing import Set, List
@@ -52,7 +53,7 @@ class AvatarToolkit_OT_ConnectBones(Operator):
except Exception as e:
logger.error(f"Failed to connect bones:", exception=e)
self.report({'ERROR'}, str(e))
self.report({'ERROR'}, traceback.format_exc())
return {'CANCELLED'}
class AvatarToolkit_OT_MergeToActive(Operator):
@@ -106,7 +107,7 @@ class AvatarToolkit_OT_MergeToActive(Operator):
except Exception as e:
logger.error(f"Failed to merge bones:", exception=e)
self.report({'ERROR'}, str(e))
self.report({'ERROR'}, traceback.format_exc())
return {'CANCELLED'}
class AvatarToolkit_OT_MergeToParent(Operator):
@@ -158,5 +159,5 @@ class AvatarToolkit_OT_MergeToParent(Operator):
except Exception as e:
logger.error(f"Failed to merge bones:", exception=e)
self.report({'ERROR'}, str(e))
self.report({'ERROR'}, traceback.format_exc())
return {'CANCELLED'}
+3 -2
View File
@@ -1,3 +1,4 @@
import traceback
import bpy
from bpy.types import Operator, Context
from ...core.translations import t
@@ -33,7 +34,7 @@ class AvatarToolKit_OT_SeparateByMaterials(Operator):
self.report({'INFO'}, t("Tools.separate_materials_success"))
return {'FINISHED'}
except Exception as e:
self.report({'ERROR'}, str(e))
self.report({'ERROR'}, traceback.format_exc())
return {'CANCELLED'}
class AvatarToolKit_OT_SeparateByLooseParts(Operator):
@@ -65,5 +66,5 @@ class AvatarToolKit_OT_SeparateByLooseParts(Operator):
self.report({'INFO'}, t("Tools.separate_loose_success"))
return {'FINISHED'}
except Exception as e:
self.report({'ERROR'}, str(e))
self.report({'ERROR'}, traceback.format_exc())
return {'CANCELLED'}
+2 -1
View File
@@ -1,3 +1,4 @@
import traceback
import bpy
from typing import Dict, List, Set, Optional, Tuple, Any
from bpy.types import Operator, Context, Object, PoseBone, EditBone, Bone, Constraint
@@ -58,7 +59,7 @@ class AvatarToolkit_OT_ConvertRigifyToUnity(Operator):
except Exception as e:
logger.error(f"Failed to convert Rigify:", exception=e)
self.report({'ERROR'}, str(e))
self.report({'ERROR'}, traceback.format_exc())
return {'CANCELLED'}
def cleanup_extra_bones(self, armature: Object) -> None:
+2 -1
View File
@@ -1,3 +1,4 @@
import traceback
import bpy
import math
from typing import Dict, List, Set, Tuple, Optional, Any, Union
@@ -104,7 +105,7 @@ class AvatarToolkit_OT_StandardizeArmature(Operator):
except Exception as e:
logger.error(f"Failed to standardize armature:", exception=e)
self.report({'ERROR'}, str(e))
self.report({'ERROR'}, traceback.format_exc())
try:
if original_mode == 'EDIT_ARMATURE':