diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-08-26 06:28:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-08-26 06:30:30 +0400 |
commit | 74f1a3f42f94d80f8f0b8d61f38583ea74c73b72 (patch) | |
tree | e537ac195d00a74befe207a17de30a23782cdadd | |
parent | 6cc38ec7f64889d7cd16b7c244ff0e0894a3f547 (diff) |
Fix T41574: Curve edit-handles draws in shadow
Also avoid redundant theme-color lookups
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 36d94c5c17b..75d64e93d59 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -6017,6 +6017,11 @@ static void draw_editnurb( drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col); + /* for shadows only show solid faces */ + if (v3d->flag2 & V3D_RENDER_SHADOW) { + return; + } + if (v3d->zbuf) glDepthFunc(GL_ALWAYS); /* first non-selected and active handles */ @@ -6040,11 +6045,11 @@ static void draw_editnurb( if (v3d->zbuf) glDepthFunc(GL_LEQUAL); + glColor3ubv(wire_col); + /* direction vectors for 3d curve paths * when at its lowest, don't render normals */ if ((cu->flag & CU_3D) && (ts->normalsize > 0.0015f) && (cu->drawflag & CU_HIDE_NORMALS) == 0) { - - UI_ThemeColor(TH_WIRE_EDIT); for (bl = ob->curve_cache->bev.first, nu = nurb; nu && bl; bl = bl->next, nu = nu->next) { BevPoint *bevp = bl->bevpoints; int nr = bl->nr; |