diff --git a/pose_library/gui.py b/pose_library/gui.py index 397f24bde3a56d3677a39961c1bc76646ebb8150..e648de15a3ab698479ae0fb187205972a15130be 100644 --- a/pose_library/gui.py +++ b/pose_library/gui.py @@ -146,9 +146,9 @@ class ASSETBROWSER_PT_pose_library_usage(PoseLibraryPanel, asset_utils.AssetBrow col = layout.column(align=True) col.prop(wm, "poselib_flipped") - props = col.operator("poselib.apply_pose_asset") + props = col.operator("poselib.apply_pose_asset", text="Apply") props.flipped = wm.poselib_flipped - props = col.operator("poselib.blend_pose_asset") + props = col.operator("poselib.blend_pose_asset", text="Interactive Blend") props.flipped = wm.poselib_flipped row = col.row(align=True) diff --git a/pose_library/operators.py b/pose_library/operators.py index 2032bf8b72080a8910b04bc8d1a67a3c0cdfae04..5a2a43360e1a2a32447f77bfa3f6a25ab0c56489 100644 --- a/pose_library/operators.py +++ b/pose_library/operators.py @@ -399,9 +399,13 @@ 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"} + bl_options = {"REGISTER", "UNDO", "INTERNAL"} _rna = bpy.ops.poselib.blend_pose_asset.get_rna_type() bl_label = _rna.name @@ -421,9 +425,13 @@ 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"} + bl_options = {"REGISTER", "UNDO", "INTERNAL"} _rna = bpy.ops.poselib.apply_pose_asset.get_rna_type() bl_label = _rna.name