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/blenloader | |
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/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 6 |
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; } } |