diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2021-12-21 15:31:14 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2021-12-21 15:31:14 +0300 |
commit | c08568cc376d2e4298710c4172fb0c74f0611de1 (patch) | |
tree | 2207e4a68aaed55e3006506ce5cd77e75903ca6e /pose_library | |
parent | c2eeb9bb4732602c324a011f7f913a33a5e8b1f2 (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.
Diffstat (limited to 'pose_library')
-rw-r--r-- | pose_library/operators.py | 2 |
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]: |