From a941108804db1b29b84e6f989698480810b80741 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 2 Oct 2025 09:27:16 +1000 Subject: [PATCH] Cleanup: defer loading anim_utils (previous wm.py commit wasn't enough) --- scripts/addons_core/pose_library/pose_usage.py | 3 ++- scripts/modules/keyingsets_utils.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/addons_core/pose_library/pose_usage.py b/scripts/addons_core/pose_library/pose_usage.py index a091fc63a3f..25e772db28e 100644 --- a/scripts/addons_core/pose_library/pose_usage.py +++ b/scripts/addons_core/pose_library/pose_usage.py @@ -9,7 +9,6 @@ Pose Library - usage functions. from typing import Set import re import bpy -from bpy_extras import anim_utils from bpy.types import ( Action, @@ -41,6 +40,8 @@ def _find_best_slot(action: Action, object: Object) -> ActionSlot | None: def select_bones(arm_object: Object, action: Action, *, select: bool, flipped: bool) -> None: + from bpy_extras import anim_utils + pose = arm_object.pose if not pose: return diff --git a/scripts/modules/keyingsets_utils.py b/scripts/modules/keyingsets_utils.py index 3669c76a0f9..71a948bd9bf 100644 --- a/scripts/modules/keyingsets_utils.py +++ b/scripts/modules/keyingsets_utils.py @@ -25,7 +25,6 @@ __all__ = ( import bpy -from bpy_extras import anim_utils ########################### # General Utilities @@ -130,6 +129,8 @@ def RKS_ITER_selected_bones(ksi, context, ks): # "Available" F-Curves. def RKS_GEN_available(_ksi, _context, ks, data): + from bpy_extras import anim_utils + # try to get the animation data associated with the closest # ID-block to the data (neither of which may exist/be easy to find) id_block = data.id_data