[Bf-blender-cvs] [b4c2703] cycles-ptex-24: Merge fixes

Nicholas Bishop noreply at git.blender.org
Fri Jan 30 18:00:56 CET 2015


Commit: b4c270316b0455b32f8a9fa0d726a723df252735
Author: Nicholas Bishop
Date:   Thu Jan 29 20:52:22 2015 +0100
Branches: cycles-ptex-24
https://developer.blender.org/rBb4c270316b0455b32f8a9fa0d726a723df252735

Merge fixes

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

M	source/blender/editors/sculpt_paint/paint_image_proj.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index cca66c6..c3310f9 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -3312,7 +3312,6 @@ static bool proj_paint_state_dm_init(ProjPaintState *ps)
 	ps->dm_totvert = ps->dm->getNumVerts(ps->dm);
 	ps->dm_totface = ps->dm->getNumTessFaces(ps->dm);
 
-	tess_ptex = ps->dm->getTessFaceDataArray(ps->dm, CD_TESSFACE_PTEX);
 	ps->dm_mvert = ps->dm->getVertArray(ps->dm);
 	ps->dm_mface = ps->dm->getTessFaceArray(ps->dm);
 	ps->dm_mtface = MEM_mallocN(ps->dm_totface * sizeof(MTFace *), "proj_paint_mtfaces");
@@ -3568,6 +3567,12 @@ static void project_paint_prepare_all_faces(ProjPaintState *ps, MemArena *arena,
 	MFace *mf;
 	int image_index = -1, face_index;
 
+	Mesh *me = ps->ob->data;
+	MLoopPtex *loop_ptex = CustomData_get_layer(&me->ldata, CD_LOOP_PTEX);
+	MTessFacePtex *tess_ptex = NULL;
+
+	tess_ptex = ps->dm->getTessFaceDataArray(ps->dm, CD_TESSFACE_PTEX);
+
 	for (face_index = 0, tf = ps->dm_mtface, mf = ps->dm_mface; face_index < ps->dm_totface; mf++, tf++, face_index++) {
 		bool is_face_sel;
 
@@ -3697,10 +3702,6 @@ static void project_paint_begin(ProjPaintState *ps)
 
 	bool reset_threads = true;
 
-	Mesh *me = ps->ob->data;
-	MLoopPtex *loop_ptex = CustomData_get_layer(&me->ldata, CD_LOOP_PTEX);
-	MTessFacePtex *tess_ptex = NULL;
-
 	/* ---- end defines ---- */
 
 	if (ps->source == PROJ_SRC_VIEW)




More information about the Bf-blender-cvs mailing list