[Bf-blender-cvs] [74f1a3f] master: Fix T41574: Curve edit-handles draws in shadow
Campbell Barton
noreply at git.blender.org
Tue Aug 26 04:31:18 CEST 2014
Commit: 74f1a3f42f94d80f8f0b8d61f38583ea74c73b72
Author: Campbell Barton
Date: Tue Aug 26 12:28:41 2014 +1000
Branches: master
https://developer.blender.org/rB74f1a3f42f94d80f8f0b8d61f38583ea74c73b72
Fix T41574: Curve edit-handles draws in shadow
Also avoid redundant theme-color lookups
===================================================================
M source/blender/editors/space_view3d/drawobject.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 36d94c5..75d64e9 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;
More information about the Bf-blender-cvs
mailing list