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:
authorTon Roosendaal <ton@blender.org>2010-12-23 16:16:56 +0300
committerTon Roosendaal <ton@blender.org>2010-12-23 16:16:56 +0300
commitf543fe1500740d1d8adc03d61a3506cf800e80fc (patch)
treedcfcb8ec316fe48df380bde38ebb3bb89ef5561c /source/blender/blenloader
parent1ea491d6152614fff5200d86c8f9081e842f6c01 (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/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index e86daf0ce4b..b711d704d2d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2200,6 +2200,12 @@ static void direct_link_constraints(FileData *fd, ListBase *lb)
con->lin_error = 0.f;
con->rot_error = 0.f;
}
+ case CONSTRAINT_TYPE_CHILDOF:
+ {
+ /* XXX version patch, in older code this flag wasn't always set, and is inherent to type */
+ if(con->ownspace == CONSTRAINT_SPACE_POSE)
+ con->flag |= CONSTRAINT_SPACEONCE;
+ }
break;
}
}