[Bf-blender-cvs] [da66a2c] master: Fix T43099: Modifiers in edit mode might mess up materials

Sergey Sharybin noreply at git.blender.org
Fri Jan 2 10:29:13 CET 2015


Commit: da66a2c871aee49338cb27747c67a2cb267b7b39
Author: Sergey Sharybin
Date:   Fri Jan 2 14:23:54 2015 +0500
Branches: master
https://developer.blender.org/rBda66a2c871aee49338cb27747c67a2cb267b7b39

Fix T43099: Modifiers in edit mode might mess up materials

The issue was originall caused by 2e8ba17 by removing necessery call
GPU_enable_material(). It was probably removed because in some cases
material was enabled after calling setDrawOptions.

That wasn't always a case for edit mode.

This is absolutely to be included to 2.73

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

M	source/blender/blenkernel/intern/editderivedmesh.c

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

diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index b47d9d0..204a015 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -527,6 +527,7 @@ static void emDM_drawMappedFaces(DerivedMesh *dm,
 			               setDrawOptions(userData, BM_elem_index_get(efa)));
 			if (draw_option != DM_DRAW_OPTION_SKIP) {
 				const GLenum poly_type = GL_TRIANGLES; /* BMESH NOTE, this is odd but keep it for now to match trunk */
+				GPU_enable_material(efa->mat_nr + 1, NULL);
 				if (draw_option == DM_DRAW_OPTION_STIPPLE) { /* enabled with stipple */
 
 					if (poly_prev != GL_ZERO) glEnd();




More information about the Bf-blender-cvs mailing list