[Bf-blender-cvs] [3cff776] master: Fix T44718: Cycles GLSL not working for NURBS objects.

Brecht Van Lommel noreply at git.blender.org
Sun May 17 17:26:47 CEST 2015


Commit: 3cff7768d5e919b60b42bac2182ff0efb130d720
Author: Brecht Van Lommel
Date:   Sun May 17 17:25:57 2015 +0200
Branches: master
https://developer.blender.org/rB3cff7768d5e919b60b42bac2182ff0efb130d720

Fix T44718: Cycles GLSL not working for NURBS objects.

===================================================================

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 5b2ac50..25557af 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -301,11 +301,12 @@ bool draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, const char dt)
 	if (v3d->flag2 & V3D_SHOW_SOLID_MATCAP)
 		return true;
 	
-	if (BKE_scene_use_new_shading_nodes(scene))
+	if (v3d->drawtype == OB_TEXTURE)
+		return (scene->gm.matmode == GAME_MAT_GLSL && !BKE_scene_use_new_shading_nodes(scene));
+	else if (v3d->drawtype == OB_MATERIAL && dt > OB_SOLID)
+		return true;
+	else
 		return false;
-	
-	return ((scene->gm.matmode == GAME_MAT_GLSL && v3d->drawtype == OB_TEXTURE) ||
-	        (v3d->drawtype == OB_MATERIAL)) && (dt > OB_SOLID);
 }
 
 static bool check_alpha_pass(Base *base)




More information about the Bf-blender-cvs mailing list