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@blender.org>2021-11-18 19:51:11 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-11-18 19:51:36 +0300
commitadcfbf4df8719c5b3b70349ebd20f4ce1be83de6 (patch)
tree93c8f23fe63b12aa292932a573d0e4c387a7a783
parent2b99e744f329a5bd3d3efd9fdf891e5f6d0d221d (diff)
Pose Library: explain why the 'for keymap' operators are there
The for-keymap version of the apply/blend operators take the Window Manager's `poselib_flipped` property, and passes it to the regular apply/blend operator. This makes it possible to bind a key to the operator and still have it respect the global "Flip Pose" checkbox. This behaviour was already in, this commit just adds a comment that explains this. No functional changes.
-rw-r--r--pose_library/operators.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pose_library/operators.py b/pose_library/operators.py
index 2032bf8b..f8fb7987 100644
--- a/pose_library/operators.py
+++ b/pose_library/operators.py
@@ -399,6 +399,10 @@ class POSELIB_OT_pose_asset_select_bones(PoseAssetUser, Operator):
return cls.bl_description.replace("Select", "Deselect")
+# This operator takes the Window Manager's `poselib_flipped` property, and
+# passes it to the `POSELIB_OT_blend_pose_asset` operator. This makes it
+# possible to bind a key to the operator and still have it respect the global
+# "Flip Pose" checkbox.
class POSELIB_OT_blend_pose_asset_for_keymap(Operator):
bl_idname = "poselib.blend_pose_asset_for_keymap"
bl_options = {"REGISTER", "UNDO"}
@@ -421,6 +425,10 @@ class POSELIB_OT_blend_pose_asset_for_keymap(Operator):
return bpy.ops.poselib.blend_pose_asset(context.copy(), 'INVOKE_DEFAULT', flipped=flipped)
+# This operator takes the Window Manager's `poselib_flipped` property, and
+# passes it to the `POSELIB_OT_apply_pose_asset` operator. This makes it
+# possible to bind a key to the operator and still have it respect the global
+# "Flip Pose" checkbox.
class POSELIB_OT_apply_pose_asset_for_keymap(Operator):
bl_idname = "poselib.apply_pose_asset_for_keymap"
bl_options = {"REGISTER", "UNDO"}