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:
authorBastien Montagne <montagne29@wanadoo.fr>2013-11-05 19:53:55 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-11-05 19:53:55 +0400
commitc215faf9f4c02774a430ea9b960fede7a1ed209c (patch)
tree03964c26523bffa8236f71e8bd9ccfe7202b3368 /source/blender/editors/space_view3d/drawobject.c
parent37f45454d3be45ccdc18d4138b85f6017b771525 (diff)
Fix [#37319] Forcefield on translated, unselected lamp draws in origin.
drawlamp() was not resetting OGL matrix to its org value! Thanks to Philipp Oeser for initial investigation, and Brecht for review. :)
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index d9dc549f207..c4c246be711 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1356,6 +1356,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
}
/* and back to viewspace */
+ glPushMatrix();
glLoadMatrixf(rv3d->viewmat);
copy_v3_v3(vec, ob->obmat[3]);
@@ -1391,6 +1392,8 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* restore for drawing extra stuff */
glColor3ubv(ob_wire_col);
}
+ /* and finally back to org object space! */
+ glPopMatrix();
}
static void draw_limit_line(float sta, float end, const short dflag, unsigned int col)
@@ -6876,7 +6879,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
case OB_LAMP:
if (!render_override) {
drawlamp(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
- if (dtx || (base->flag & SELECT)) glMultMatrixf(ob->obmat);
}
break;
case OB_CAMERA: