Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2021-12-21 15:31:14 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-01-11 12:42:48 +0300
commit5876b7836db45d242a55898092e69b3c17b055a9 (patch)
treec4fda640949228b2d95f90a6b65b2117859a3b0c
parent183f92c7d5fa96dbb017dd383fbd0994bf94a3b0 (diff)
Fix T94264: Pose Library, doubleclick-to-apply only in asset browser
Fix a keymap collision between the pose library and the file manager. Only allow `applying a pose by doubleclicking it in the asset browser, and not in the file browser. This prevents a crash; appending an Action would temp-load it in order to apply it as a pose, which of course conflicts with the "Append" functionality.
-rw-r--r--pose_library/operators.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pose_library/operators.py b/pose_library/operators.py
index e4e9c9af..49e3b50b 100644
--- a/pose_library/operators.py
+++ b/pose_library/operators.py
@@ -440,6 +440,8 @@ class POSELIB_OT_apply_pose_asset_for_keymap(Operator):
@classmethod
def poll(cls, context: Context) -> bool:
+ if not asset_utils.SpaceAssetInfo.is_asset_browser(context.space_data):
+ return False
return bpy.ops.poselib.apply_pose_asset.poll(context.copy())
def execute(self, context: Context) -> Set[str]: