diff --git a/README.md b/README.md index 7b8f1ea..b961eb6 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,11 @@ If you like what we do and want to help support the development of cats you can ## Blender version support policies. -You can find them on the wiki here [HERE](https://avatartoolkit.xyz/wiki.html?version=0.2.0#what-is-avatar-toolkits-version-support-policy) +You can find them on the wiki here [HERE](https://avatartoolkit.xyz/legacywiki.html?version=0.2.1#what-is-avatar-toolkits-version-support-policy) ## Features -See everything Avatar Toolkit has ot offer [here](https://avatartoolkit.xyz/wiki.html) +See everything Avatar Toolkit has ot offer [here](https://avatartoolkit.xyz/legacywiki.html) ## Requirements @@ -48,7 +48,7 @@ See everything Avatar Toolkit has ot offer [here](https://avatartoolkit.xyz/wiki Currently None. ## Installation -You can find out how to install Avatar Toolkit [here](https://avatartoolkit.xyz/wiki.html?version=0.2.0#how-to-install-avatar-toolkit) +You can find out how to install Avatar Toolkit [here](https://avatartoolkit.xyz/legacywiki.html?version=0.2.0#how-to-install-avatar-toolkit) ## Help diff --git a/core/common.py b/core/common.py index d4ea528..01673b6 100644 --- a/core/common.py +++ b/core/common.py @@ -16,9 +16,10 @@ from bpy.types import (Context, Object, Modifier, EditBone, Operator, Material, from functools import lru_cache from bpy.props import PointerProperty, IntProperty, StringProperty from bpy.utils import register_class -from .logging_setup import logger -from .translations import t -from .dictionaries import reverse_bone_lookup, simplify_bonename +from ..core.logging_setup import logger +from ..core.translations import t +from ..core.dictionaries import bone_names +from .dictionaries import reverse_bone_lookup, bone_names, simplify_bonename class SceneMatClass(PropertyGroup): mat: PointerProperty(type=Material) diff --git a/core/importers/importer.py b/core/importers/importer.py index d8000bb..77f0a87 100644 --- a/core/importers/importer.py +++ b/core/importers/importer.py @@ -18,7 +18,7 @@ logger: logging.Logger = logging.getLogger(__name__) import importlib.util if importlib.util.find_spec("io_scene_valvesource") is not None: - from io_scene_valvesource.import_smd import SmdImporter + from io_scene_valvesource.import_smd import SmdImporter # type: ignore class ImportProgress: """Tracks and logs the progress of multi-file imports""" diff --git a/core/logging_setup.py b/core/logging_setup.py index 434274d..dbfe003 100644 --- a/core/logging_setup.py +++ b/core/logging_setup.py @@ -33,7 +33,7 @@ def configure_logging(enabled: bool = False, level: str = "WARNING") -> None: logger.addHandler(handler) def error_with_traceback(msg, *args, **kwargs): - if kwargs.get('exc_info', False) or isinstance(msg, Exception): + if isinstance(kwargs.get('exception', None), Exception): full_msg = f"{msg}\n{traceback.format_exc()}" _original_error(full_msg, *args, **{**kwargs, 'exc_info': False}) else: diff --git a/core/resonite_utils.py b/core/resonite_utils.py index b5e539f..d22504d 100644 --- a/core/resonite_utils.py +++ b/core/resonite_utils.py @@ -1,3 +1,4 @@ +import traceback from types import FrameType import bpy import bpy_extras diff --git a/functions/custom_tools/armature_merging.py b/functions/custom_tools/armature_merging.py index d65afa2..69fbd73 100644 --- a/functions/custom_tools/armature_merging.py +++ b/functions/custom_tools/armature_merging.py @@ -1,3 +1,4 @@ +import traceback import bpy import numpy as np from typing import List, Optional, Dict, Set, Tuple, Any diff --git a/functions/custom_tools/mesh_attachment.py b/functions/custom_tools/mesh_attachment.py index 20d4900..e41a428 100644 --- a/functions/custom_tools/mesh_attachment.py +++ b/functions/custom_tools/mesh_attachment.py @@ -1,3 +1,4 @@ +import traceback import bpy from bpy.types import Operator, Context, Object, ArmatureModifier, VertexGroup from mathutils import Vector diff --git a/functions/optimization/materials_tools.py b/functions/optimization/materials_tools.py index 9dfee9b..fd3eee6 100644 --- a/functions/optimization/materials_tools.py +++ b/functions/optimization/materials_tools.py @@ -1,3 +1,4 @@ +import traceback import bpy import re from typing import Set, Dict, List, Optional, Tuple @@ -121,6 +122,7 @@ class AvatarToolkit_OT_CombineMaterials(Operator): try: num_cleaned = self.clean_material_slots(meshes) + except Exception: logger.error(f"Material slot cleanup failed: {traceback.format_exc()}") self.report({'ERROR'}, t("Optimization.error.slot_cleanup")) diff --git a/functions/optimization/mesh_tools.py b/functions/optimization/mesh_tools.py index 1870871..e7ae25c 100644 --- a/functions/optimization/mesh_tools.py +++ b/functions/optimization/mesh_tools.py @@ -1,3 +1,4 @@ +import traceback import bpy from typing import Set, List, Tuple, ClassVar from bpy.types import Operator, Context, Object diff --git a/functions/optimization/remove_doubles.py b/functions/optimization/remove_doubles.py index c7aede2..c31c198 100644 --- a/functions/optimization/remove_doubles.py +++ b/functions/optimization/remove_doubles.py @@ -122,7 +122,6 @@ class AvatarToolkit_OT_RemoveDoubles(Operator): except Exception: logger.error(f"Error in execute: {traceback.format_exc()}") return {'CANCELLED'} - def modal(self, context: Context, event: Event) -> set[ModalReturnType]: """Modal operator execution""" try: diff --git a/functions/pose_mode.py b/functions/pose_mode.py index 1a15e19..b55fea1 100644 --- a/functions/pose_mode.py +++ b/functions/pose_mode.py @@ -1,3 +1,4 @@ +import traceback import bpy from typing import Set, Dict, List, Tuple, Optional, Any from bpy.props import StringProperty diff --git a/functions/tools/additional_tools.py b/functions/tools/additional_tools.py index c7830d7..c8be03e 100644 --- a/functions/tools/additional_tools.py +++ b/functions/tools/additional_tools.py @@ -1,3 +1,4 @@ +import traceback import bpy import numpy as np from bpy.types import Operator, Context diff --git a/functions/tools/bone_tools.py b/functions/tools/bone_tools.py index 0c104fd..667286d 100644 --- a/functions/tools/bone_tools.py +++ b/functions/tools/bone_tools.py @@ -1,3 +1,4 @@ +import traceback import bpy import re from bpy.types import Operator, Context, EditBone, Object, Armature, Mesh @@ -86,7 +87,6 @@ class AvatarToolKit_OT_CreateDigitigradeLegs(Operator): except Exception as e: self.report({'ERROR'}, t("Tools.digitigrade_error", error=traceback.format_exc())) - return False def execute(self, context: Context) -> set[str]: diff --git a/functions/tools/merge_tools.py b/functions/tools/merge_tools.py index 837bd6f..8dbba25 100644 --- a/functions/tools/merge_tools.py +++ b/functions/tools/merge_tools.py @@ -1,3 +1,4 @@ +import traceback import bpy import math from typing import Set, List diff --git a/functions/tools/mesh_separation.py b/functions/tools/mesh_separation.py index c2223c7..eebbbb3 100644 --- a/functions/tools/mesh_separation.py +++ b/functions/tools/mesh_separation.py @@ -1,3 +1,4 @@ +import traceback import bpy from bpy.types import Operator, Context from ...core.translations import t diff --git a/functions/tools/rigify_converter.py b/functions/tools/rigify_converter.py index 7607b7c..5401f18 100644 --- a/functions/tools/rigify_converter.py +++ b/functions/tools/rigify_converter.py @@ -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 diff --git a/functions/visemes.py b/functions/visemes.py index 418ccb1..008bd3c 100644 --- a/functions/visemes.py +++ b/functions/visemes.py @@ -1,6 +1,7 @@ # This code was taken from Cats Blender Plugin Unoffical, some of this code is by the original developers, however was improved by myself. # Didn't think it was necessary to re-make something that works well. +import traceback import bpy from typing import Dict, List, Optional, Tuple, Any, Set, Union from bpy.types import Operator, Context, Object, ShapeKey