[Bf-blender-cvs] [262d73d] soc-2013-paint: Fix solid mode viewport texture painting overtrying to upload textures

Antony Riakiotakis noreply at git.blender.org
Mon May 12 01:54:24 CEST 2014


Commit: 262d73d60c9cc5e76e63b2747a8c233877fe3719
Author: Antony Riakiotakis
Date:   Mon May 12 02:52:49 2014 +0300
https://developer.blender.org/rB262d73d60c9cc5e76e63b2747a8c233877fe3719

Fix solid mode viewport texture painting overtrying to upload textures

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

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

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

diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index cfd089c..b285952 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -673,6 +673,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
 	MCol *mcol;
 	int i, orig;
 	int colType, startFace = 0;
+	bool use_tface = uvflag & DM_DRAW_USE_ACTIVE_UV;
 
 	/* double lookup */
 	const int *index_mf_to_mpoly = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
@@ -751,7 +752,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
 			tf_stencil = tf_stencil_base ? tf_stencil_base + i : NULL;
 
 			if (drawParams) {
-				draw_option = drawParams(tf, (mcol != NULL), mf->mat_nr);
+				draw_option = drawParams(use_tface ? tf : NULL, (mcol != NULL), mf->mat_nr);
 			}
 			else {
 				if (index_mf_to_mpoly) {
@@ -870,7 +871,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
 					next_actualFace = dm->drawObject->triangle_to_mface[i + 1];
 
 				if (drawParams) {
-					draw_option = drawParams(tf ? &tf[actualFace] : NULL, (mcol != NULL), mf[actualFace].mat_nr);
+					draw_option = drawParams(use_tface && tf ? &tf[actualFace] : NULL, (mcol != NULL), mf[actualFace].mat_nr);
 				}
 				else {
 					if (index_mf_to_mpoly) {




More information about the Bf-blender-cvs mailing list