diff options
author | Ton Roosendaal <ton@blender.org> | 2010-12-23 16:16:56 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-12-23 16:16:56 +0300 |
commit | f543fe1500740d1d8adc03d61a3506cf800e80fc (patch) | |
tree | dcfcb8ec316fe48df380bde38ebb3bb89ef5561c /source/blender/editors/object | |
parent | 1ea491d6152614fff5200d86c8f9081e842f6c01 (diff) |
Bugfix #25341
Child-of constraint issue: on adding, it wasn't checking owner
correctly for Bones, resulting in a constraint working in wrong
space; it looked as if transform was applied double when moving
the object. Only adding via Py API went wrong btw.
Also found a silly check for drawing constraints, which caused
constraint initialization to happen for every object on every
redraw!
Implementation note: con->flag CONSTRAINT_SPACEONCE was only used
for child-of constraints in Bones, so I've patched it on file
reading to always set the flag. Marked with XXX, so it can be
removed one day. Now at least things get corrected well for
imported armatures.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index f856ab7649c..5afba182cc0 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1298,7 +1298,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase { /* if this constraint is being added to a posechannel, make sure * the constraint gets evaluated in pose-space */ - if (ob->mode & OB_MODE_POSE) { + if (pchan) { con->ownspace = CONSTRAINT_SPACE_POSE; con->flag |= CONSTRAINT_SPACEONCE; } |