Remove MTFace DM_paint_uvlayer_active_get func
authorCampbell Barton <ideasman42@gmail.com>
Thu, 16 Jul 2015 18:26:17 +0000 (04:26 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 16 Jul 2015 18:26:17 +0000 (04:26 +1000)
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/subsurf_ccg.c

index 0a4cc7f543f2ff285d28b248ddbb87c2e4f5ae0d..09749629eeb6b04ad24c526b489f7634557d14dc 100644 (file)
@@ -615,8 +615,7 @@ void DM_ensure_looptri(DerivedMesh *dm);
 void DM_update_tessface_data(DerivedMesh *dm);
 
 void DM_update_materials(DerivedMesh *dm, struct Object *ob);
-struct MTFace *DM_paint_uvlayer_active_get(DerivedMesh *dm, int mat_nr);
-struct MLoopUV *DM_paint_uvlayer_active_get_mloopuv(DerivedMesh *dm, int mat_nr);
+struct MLoopUV *DM_paint_uvlayer_active_get(DerivedMesh *dm, int mat_nr);
 
 void DM_interp_vert_data(
         struct DerivedMesh *source, struct DerivedMesh *dest,
index 1bf49ad8fb05cae79b060feb26d6487f9df1946d..b3be4a4ebcf87f7b2bab407894047cd261cab05c 100644 (file)
@@ -576,30 +576,7 @@ void DM_update_materials(DerivedMesh *dm, Object *ob)
        }
 }
 
-MTFace *DM_paint_uvlayer_active_get(DerivedMesh *dm, int mat_nr)
-{
-       MTFace *tf_base;
-
-       BLI_assert(mat_nr < dm->totmat);
-
-       if (dm->mat[mat_nr] && dm->mat[mat_nr]->texpaintslot &&
-           dm->mat[mat_nr]->texpaintslot[dm->mat[mat_nr]->paint_active_slot].uvname)
-       {
-               tf_base = CustomData_get_layer_named(&dm->faceData, CD_MTFACE,
-                                                    dm->mat[mat_nr]->texpaintslot[dm->mat[mat_nr]->paint_active_slot].uvname);
-               /* This can fail if we have changed the name in the UV layer list and have assigned the old name in the material
-                * texture slot.*/
-               if (!tf_base)
-                       tf_base = CustomData_get_layer(&dm->faceData, CD_MTFACE);
-       }
-       else {
-               tf_base = CustomData_get_layer(&dm->faceData, CD_MTFACE);
-       }
-
-       return tf_base;
-}
-
-MLoopUV *DM_paint_uvlayer_active_get_mloopuv(DerivedMesh *dm, int mat_nr)
+MLoopUV *DM_paint_uvlayer_active_get(DerivedMesh *dm, int mat_nr)
 {
        MLoopUV *uv_base;
 
index 6f2579442c35041fe595ab1a47ef8711471f41e9..5f53fa6dca17d32f6d847bbf72c7d49ecff6955e 100644 (file)
@@ -1384,7 +1384,7 @@ static void cdDM_buffer_copy_uv_texpaint(
        uv_base = MEM_mallocN(totmaterial * sizeof(*uv_base), "texslots");
 
        for (i = 0; i < totmaterial; i++) {
-               uv_base[i] = DM_paint_uvlayer_active_get_mloopuv(dm, i);
+               uv_base[i] = DM_paint_uvlayer_active_get(dm, i);
        }
 
        stencil = CustomData_get_stencil_layer(&dm->loopData, CD_MLOOPUV);
index 4bc6f62901d67dcb0e68e6329c12433294653ec3..159e26ba869c39738098b85736269fdbed9bef12 100644 (file)
@@ -2050,7 +2050,7 @@ static void ccgDM_buffer_copy_uv_texpaint(
        mloopuv_base = MEM_mallocN(totmaterial * sizeof(*mloopuv_base), "texslots");
 
        for (i = 0; i < totmaterial; i++) {
-               mloopuv_base[i] = DM_paint_uvlayer_active_get_mloopuv(dm, i);
+               mloopuv_base[i] = DM_paint_uvlayer_active_get(dm, i);
        }
 
        stencil = CustomData_get_stencil_layer(&dm->loopData, CD_MLOOPUV);