diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-02-08 08:51:20 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-02-08 08:51:20 +0300 |
commit | 9d6f9e74d4ad76269146e36697a21679c7d5aaa5 (patch) | |
tree | 1fdce9c4b981edcb37b510ad7144217161c7da2d /source/blender/editors/object/object_constraint.c | |
parent | 53afd198084e4bca72d6694708d801a799a2f76f (diff) |
Bugfix [#25814] ChildOf constraint: double transformation in object
mode with drivers
ChildOf constraints added using the PoseBone.constraints.new() method
via Python scripts instead of using the operator (this latter method
is still the preferred/recommended method) were not getting some
critical flags set, causing errors arising from space conversions
being performed more than once.
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index e92d73a3e67..f3346bf200c 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1272,12 +1272,12 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase bPoseChannel *pchan; bConstraint *con; - if(list == &ob->constraints) { + if (list == &ob->constraints) { pchan= NULL; } else { pchan= get_active_posechannel(ob); - + /* ensure not to confuse object/pose adding */ if (pchan == NULL) { BKE_report(op->reports, RPT_ERROR, "No active pose bone to add a constraint to."); @@ -1327,19 +1327,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase } /* do type-specific tweaking to the constraint settings */ - // TODO: does action constraint need anything here - i.e. spaceonce? switch (type) { - case CONSTRAINT_TYPE_CHILDOF: - { - /* if this constraint is being added to a posechannel, make sure - * the constraint gets evaluated in pose-space */ - if (pchan) { - con->ownspace = CONSTRAINT_SPACE_POSE; - con->flag |= CONSTRAINT_SPACEONCE; - } - } - break; - case CONSTRAINT_TYPE_PYTHON: // FIXME: this code is not really valid anymore { #ifdef WITH_PYTHON |