fix flip animation

add to menu
fix resonite animx importer bug

add flip animations

add flip animation keyframes to help users rekey and remake animations as if they were mirrored.
This commit is contained in:
989onan
2025-04-02 22:09:27 -04:00
parent 199551a505
commit f16105517e
7 changed files with 140 additions and 23 deletions
+4 -5
View File
@@ -15,10 +15,9 @@ 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 ..core.logging_setup import logger
from ..core.translations import t
from ..core.dictionaries import bone_names
from .dictionaries import reverse_bone_lookup, bone_names
from .logging_setup import logger
from .translations import t
from .dictionaries import reverse_bone_lookup, simplify_bonename
class SceneMatClass(PropertyGroup):
mat: PointerProperty(type=Material)
@@ -383,7 +382,7 @@ def clear_unused_data_blocks() -> int:
if isinstance(getattr(bpy.data, attr), bpy.types.bpy_prop_collection))
return initial_count - final_count
def identify_bones(arm_data: bpy.types.Armature, context: bpy.types.Context) -> Dict[str,str]:
def identify_bones(arm_data: bpy.types.Armature) -> Dict[str,str]:
"""Identify bone names in an armature based on our reverse dictionary, so there is no confusion to what a bone is.
Essentially makes a dictionary of keys from dictionaries.bone_names like "hips", and the corosponding value is the bone that can be mapped to that key."""
returned: Dict[str,str] = {}
-1
View File
@@ -3,7 +3,6 @@ from os import replace
from re import S
from types import FrameType
import lz4.block
from . import resonite_types
from . import common
+1 -1
View File
@@ -77,7 +77,7 @@ class AvatarToolkit_OT_ConvertResonite(Operator):
total_bones = len(arm_data.bones)
with ProgressTracker(context, total_bones, t("Tools.convert_resonite.operation")) as progress:
for key_simple,bone_name in identify_bones(arm_data,context).items():
for key_simple,bone_name in identify_bones(arm_data).items():
if key_simple in resonite_translations:
new_name = resonite_translations[key_simple]