Skip to content

Commit

Permalink
chore: tweak version check
Browse files Browse the repository at this point in the history
  • Loading branch information
saturday06 committed Aug 18, 2024
1 parent 379637a commit fc1251e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/vrm0/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ def migrate_auto_pose(_context: Context, armature_data: Armature) -> None:
ext = get_armature_extension(armature_data)
if tuple(ext.addon_version) == ext.INITIAL_ADDON_VERSION or tuple(
ext.addon_version
) >= (2, 20, 78):
) >= (2, 20, 81):
return

humanoid = ext.vrm0.humanoid
Expand Down
7 changes: 2 additions & 5 deletions src/io_scene_vrm/editor/vrm1/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from mathutils import Vector

from ...common import convert, ops, shader
from ...common.preferences import get_preferences
from ..extension import get_armature_extension
from .property_group import (
Vrm1ExpressionPropertyGroup,
Expand Down Expand Up @@ -184,15 +183,13 @@ def migrate_pose(context: Context, armature: Object, armature_data: Armature) ->
humanoid.pose = humanoid.POSE_CURRENT_POSE.identifier


def migrate_auto_pose(context: Context, armature_data: Armature) -> None:
def migrate_auto_pose(_context: Context, armature_data: Armature) -> None:
ext = get_armature_extension(armature_data)
if tuple(ext.addon_version) == ext.INITIAL_ADDON_VERSION or tuple(
ext.addon_version
) >= (2, 20, 78):
) >= (2, 20, 81):
return

_preferences = get_preferences(context)

humanoid = ext.vrm1.humanoid
if not isinstance(humanoid.get("pose"), int):
humanoid.pose = humanoid.POSE_CURRENT_POSE.identifier
Expand Down

0 comments on commit fc1251e

Please sign in to comment.