svn merge -r37335:37500 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / editors / object / object_bake.c
index fc5f09f2fe0ad7c6c8efa3ff46a7e52de95bb34e..5eb3606d68da1fd0e69fe74a56eaa88739f31b48 100644 (file)
@@ -360,6 +360,16 @@ static int multiresbake_test_break(MultiresBakeRender *bkr)
 static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData passKnownData,
                              MInitBakeData initBakeData, MApplyBakeData applyBakeData, MFreeBakeData freeBakeData)
 {
+#if 1 // BMESH_TODO
+       (void)bkr;
+       (void)ima;
+       (void)passKnownData;
+       (void)initBakeData;
+       (void)applyBakeData;
+       (void)freeBakeData;
+
+       printf("BMESH_TODO" AT "\n");
+#else
        DerivedMesh *dm= bkr->lores_dm;
        ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
        const int lvl= bkr->lvl;
@@ -442,6 +452,7 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData
                if(freeBakeData)
                        freeBakeData(data.bake_data);
        }
+#endif // BMESH_TODO
 }
 
 static void interp_bilinear_quad_data(float data[4][3], float u, float v, float res[3])
@@ -504,6 +515,16 @@ static void interp_bilinear_grid(DMGridData *grid, int grid_size, float crn_x, f
 
 static void get_ccgdm_data(DerivedMesh *lodm, DerivedMesh *hidm,  const int lvl, const int face_index, const float u, const float v, float co[3], float n[3])
 {
+#if 1 // BMESH_TODO
+       (void)lodm;
+       (void)hidm;
+       (void)lvl;
+       (void)face_index;
+       (void)u;
+       (void)v;
+       (void)co;
+       (void)n;
+#else
        MFace mface;
        DMGridData **grid_data;
        float crn_x, crn_y;
@@ -546,6 +567,7 @@ static void get_ccgdm_data(DerivedMesh *lodm, DerivedMesh *hidm,  const int lvl,
 
        if(co != NULL)
                interp_bilinear_grid(grid_data[g_index + S], grid_size, crn_x, crn_y, 1, co);
+#endif
 }
 
 /* mode = 0: interpolate normals,
@@ -675,6 +697,16 @@ static void apply_heights_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
                                    const int face_index, const int lvl, const float st[2],
                                    float UNUSED(tangmat[3][3]), const int x, const int y)
 {
+#if 1 // BMESH_TODO
+       (void)lores_dm;
+       (void)hires_dm;
+       (void)bake_data;
+       (void)face_index;
+       (void)lvl;
+       (void)st;
+       (void)x;
+       (void)y;
+#else
        MTFace *mtface= CustomData_get_layer(&lores_dm->faceData, CD_MTFACE);
        MFace mface;
        Image *ima= mtface[face_index].tpage;
@@ -734,6 +766,7 @@ static void apply_heights_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
                char *rrgb= (char*)ibuf->rect + pixel*4;
                rrgb[3]= 255;
        }
+#endif // BMESH_TODO
 }
 
 /* MultiresBake callback for normals' baking
@@ -745,6 +778,16 @@ static void apply_tangmat_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
                                    const int face_index, const int lvl, const float st[2],
                                    float tangmat[3][3], const int x, const int y)
 {
+#if 1 // BMESH_TODO
+       (void)lores_dm;
+       (void)hires_dm;
+       (void)face_index;
+       (void)lvl;
+       (void)st;
+       (void)tangmat;
+       (void)y;
+       (void)x;
+#else
        MTFace *mtface= CustomData_get_layer(&lores_dm->faceData, CD_MTFACE);
        MFace mface;
        Image *ima= mtface[face_index].tpage;
@@ -790,6 +833,7 @@ static void apply_tangmat_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
                rrgb[2]= FTOCHAR(vec[2]);
                rrgb[3]= 255;
        }
+#endif
 }
 
 static void count_images(MultiresBakeRender *bkr)
@@ -971,7 +1015,7 @@ static DerivedMesh *multiresbake_create_loresdm(Scene *scene, Object *ob, int *l
 
        if(mmd->lvl==0) {
                DerivedMesh *tmp_dm= CDDM_from_mesh(me, ob);
-               dm= CDDM_copy(tmp_dm);
+               dm= CDDM_copy(tmp_dm, 0);
                tmp_dm->release(tmp_dm);
        } else {
                MultiresModifierData tmp_mmd= *mmd;