diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-07 19:20:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-07 19:20:51 +0400 |
commit | 742171f60943e78f148fe6be15e4eaaf0c5f85ec (patch) | |
tree | c836693a4d21ea5ea82d3cf0176be1a96e63ddc9 /source | |
parent | 3140cd993d4c63ef597bf5a2314fab7e8e847667 (diff) |
fix for crash with recent color commits to draw-object, this case wasnt handled correctly before.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 2c59e2861e5..edb40adfc67 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1774,9 +1774,16 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base #ifdef VIEW3D_CAMERA_BORDER_HACK if (is_view && !(G.f & G_PICKSEL)) { - view3d_camera_border_hack_col[0] = ob_wire_col[0]; - view3d_camera_border_hack_col[1] = ob_wire_col[1]; - view3d_camera_border_hack_col[2] = ob_wire_col[2]; + if ((flag & DRAW_CONSTCOLOR) == 0) { + view3d_camera_border_hack_col[0] = ob_wire_col[0]; + view3d_camera_border_hack_col[1] = ob_wire_col[1]; + view3d_camera_border_hack_col[2] = ob_wire_col[2]; + } + else { + float col[4]; + glGetFloatv(GL_CURRENT_COLOR, col); + rgb_float_to_uchar(view3d_camera_border_hack_col, col); + } view3d_camera_border_hack_test = TRUE; return; } |