Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-05-06 16:13:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-06 16:13:45 +0400
commite17a708dce17c2d85cfecb1330278a47b4d1be19 (patch)
treeb9aaf1010126c83989ba020cf2280460a0fdaa3f /source/blender/editors/armature
parent1755dc74773cfeee5ca190410b9cc6393c093009 (diff)
add back pose specials menu, also add back the ability to clear user transforms on all bones (not just selected - mango request - was possible in 2.4x).
- rename only_select op property to only_selected (both were used). - only do mingw workaround when building with FREE_WINDOWS defined.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/armature_ops.c3
-rw-r--r--source/blender/editors/armature/poseobject.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index d7814e1eb4c..ab8bfb2b98a 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -402,5 +402,8 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "POSE_OT_push", EKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "POSE_OT_relax", EKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "POSE_OT_breakdown", EKEY, KM_PRESS, KM_SHIFT, 0);
+
+ /* menus */
+ WM_keymap_add_menu(keymap, "VIEW3D_MT_pose_specials", WKEY, KM_PRESS, 0, 0);
}
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 2ed5421e8ba..8cc0251e024 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -2302,11 +2302,12 @@ void POSE_OT_quaternions_flip(wmOperatorType *ot)
/* ********************************************** */
/* Clear User Transforms */
-static int pose_clear_user_transforms_exec (bContext *C, wmOperator *UNUSED(op))
+static int pose_clear_user_transforms_exec (bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
float cframe = (float)CFRA;
+ const short only_select = RNA_boolean_get(op->ptr, "only_selected");
if ((ob->adt) && (ob->adt->action)) {
/* XXX: this is just like this to avoid contaminating anything else;
@@ -2329,7 +2330,7 @@ static int pose_clear_user_transforms_exec (bContext *C, wmOperator *UNUSED(op))
/* copy back values, but on selected bones only */
for (pchan = dummyPose->chanbase.first; pchan; pchan = pchan->next) {
- pose_bone_do_paste(ob, pchan, 1, 0);
+ pose_bone_do_paste(ob, pchan, only_select, 0);
}
/* free temp data - free manually as was copied without constraints */
@@ -2373,5 +2374,8 @@ void POSE_OT_user_transforms_clear(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_boolean(ot->srna, "only_selected", TRUE, "Only Selected", "Only visible/selected bones");
}