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>2010-10-08 03:17:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-08 03:17:14 +0400
commitafa1bf33fb48db48fb909e4853094f2d962f8327 (patch)
tree5a98ee0fcbc60a9d5702d0fb22e88cf73797851c /source/blender/editors/object/object_constraint.c
parentc52c10d1781825290d56d27551b6a51b4ab85b40 (diff)
bugfix [#21610] alt-r for bone (reset rotation) doesnt work in weight painting mode
pose operators now run in weightpaint mode when the weight paint objects pose armature is in pose mode.
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r--source/blender/editors/object/object_constraint.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index f5d87df10a1..fd3c8b165c0 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -65,6 +65,7 @@
#include "RNA_enum_types.h"
#include "ED_object.h"
+#include "ED_armature.h"
#include "ED_screen.h"
#include "UI_interface.h"
@@ -935,7 +936,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
+ Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
/* free constraints for all selected bones */
CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
@@ -1364,7 +1365,7 @@ static int object_constraint_add_exec(bContext *C, wmOperator *op)
/* dummy operator callback */
static int pose_constraint_add_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_active_context(C);
+ Object *ob= ED_object_pose_armature(ED_object_active_context(C));
int type= RNA_enum_get(op->ptr, "type");
short with_targets= 0;
@@ -1467,7 +1468,7 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
/* present menu with options + validation for targets to use */
static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *evt)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
bPoseChannel *pchan= get_active_posechannel(ob);
bConstraint *con= NULL;
@@ -1551,7 +1552,7 @@ void POSE_OT_ik_add(wmOperatorType *ot)
/* remove IK constraints from selected bones */
static int pose_ik_clear_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_active_object(C);
+ Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
/* only remove IK Constraints */
CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)