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.
This commit is contained in:
Sybren A. Stüvel 2021-12-21 13:31:14 +01:00
parent c2eeb9bb47
commit c08568cc37
Notes: blender-bot 2023-02-13 16:59:24 +01:00
Referenced by issue blender/blender#93479: 3.0 Potential candidates for corrective releases
Referenced by issue blender/blender#94264, Blender Crashing While Appending Animation Action
Referenced by issue blender/blender#93479, 3.0 Potential candidates for corrective releases
1 changed files with 2 additions and 0 deletions

View File

@ -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]: