fix [#35457] Mirror the U texture coordinate does not work in projection painting
authorCampbell Barton <ideasman42@gmail.com>
Mon, 24 Jun 2013 16:06:27 +0000 (16:06 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 24 Jun 2013 16:06:27 +0000 (16:06 +0000)
regression since 2.61

source/blender/editors/sculpt_paint/paint_image_proj.c

index 7f47657c3ff8e4d39b13794dc5fae81f70285ff1..a24ee13e3bf6430dbce592b7c4673194a010000d 100644 (file)
@@ -2827,20 +2827,19 @@ static void project_paint_begin(ProjPaintState *ps)
         * this avoids re-generating the derived mesh just to get the new index */
        if (ps->do_layer_clone) {
                //int layer_num = CustomData_get_clone_layer(&ps->dm->faceData, CD_MTFACE);
-               int layer_num = CustomData_get_clone_layer(&((Mesh *)ps->ob->data)->fdata, CD_MTFACE);
+               int layer_num = CustomData_get_clone_layer(&((Mesh *)ps->ob->data)->pdata, CD_MTEXPOLY);
                if (layer_num != -1)
                        ps->dm_mtface_clone = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num);
 
                if (ps->dm_mtface_clone == NULL || ps->dm_mtface_clone == ps->dm_mtface) {
                        ps->do_layer_clone = FALSE;
                        ps->dm_mtface_clone = NULL;
-                       printf("ACK!\n");
                }
        }
 
        if (ps->do_layer_stencil) {
                //int layer_num = CustomData_get_stencil_layer(&ps->dm->faceData, CD_MTFACE);
-               int layer_num = CustomData_get_stencil_layer(&((Mesh *)ps->ob->data)->fdata, CD_MTFACE);
+               int layer_num = CustomData_get_stencil_layer(&((Mesh *)ps->ob->data)->pdata, CD_MTEXPOLY);
                if (layer_num != -1)
                        ps->dm_mtface_stencil = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num);