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/editors/space_view3d/drawobject.c
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/editors/space_view3d/drawobject.c')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index b6d0efa26c5..1f1acef02db 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -6293,12 +6293,13 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
/* Drawing the constraint lines */
- list = &ob->constraints;
- if (list) {
+ if (ob->constraints.first) {
bConstraint *curcon;
bConstraintOb *cob;
unsigned char col1[4], col2[4];
+ list = &ob->constraints;
+
UI_GetThemeColor3ubv(TH_GRID, col1);
UI_make_axis_color(col1, col2, 'Z');
glColor3ubv(col2);