[Bf-extensions-cvs] [bf49eeaa] master: pose_library: minor changes for shortcuts to show in menus
Campbell Barton
noreply at git.blender.org
Wed Jan 11 09:30:37 CET 2023
Commit: bf49eeaa14c445d3c53068203fdf91bff568fe64
Author: Campbell Barton
Date: Wed Jan 11 19:16:18 2023 +1100
Branches: master
https://developer.blender.org/rBAbf49eeaa14c445d3c53068203fdf91bff568fe64
pose_library: minor changes for shortcuts to show in menus
template_asset_view operators for the pose library now match the menu
items.
- Set 'flipped' to false for the activate operator.
- Remove 'release_confirmed' assignment for the drag operator,
this is now set based on the event that activated it.
Part of fix for T103267.
===================================================================
M pose_library/gui.py
===================================================================
diff --git a/pose_library/gui.py b/pose_library/gui.py
index 18c14380..c5b5747e 100644
--- a/pose_library/gui.py
+++ b/pose_library/gui.py
@@ -50,7 +50,10 @@ class VIEW3D_PT_pose_library(PoseLibraryPanel, Panel):
activate_operator="poselib.apply_pose_asset",
drag_operator="poselib.blend_pose_asset",
)
- drag_op_props.release_confirm = True
+
+ # Make sure operators properties match those used in
+ # `pose_library_list_item_context_menu` so shortcuts show in menus (see T103267).
+ activate_op_props.flipped = False
def pose_library_list_item_context_menu(self: UIList, context: Context) -> None:
@@ -79,6 +82,7 @@ def pose_library_list_item_context_menu(self: UIList, context: Context) -> None:
layout.separator()
+ # Make sure these operator properties match those used in `VIEW3D_PT_pose_library`.
layout.operator("poselib.apply_pose_asset", text="Apply Pose").flipped = False
layout.operator("poselib.apply_pose_asset", text="Apply Pose Flipped").flipped = True
More information about the Bf-extensions-cvs
mailing list