diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index dd29a8a90de..b06cd72a5a3 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1649,7 +1649,7 @@ static void mesh_calc_modifiers( const bool do_final_wmcol = (scene->toolsettings->weights_preview == WP_WPREVIEW_FINAL) && do_wmcol; #endif const bool do_final_wmcol = false; - const bool do_init_wmcol = ((dataMask & CD_MASK_PREVIEW_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT) && !do_final_wmcol); + const bool do_init_wmcol = ((dataMask & CD_MASK_PREVIEW_MLOOPCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT) && !do_final_wmcol); /* XXX Same as above... For now, only weights preview in WPaint mode. */ const bool do_mod_wmcol = do_init_wmcol; @@ -2555,16 +2555,16 @@ static CustomDataMask object_get_datamask(const Scene *scene, Object *ob, bool * /* check if we need tfaces & mcols due to face select or texture paint */ if ((ob->mode & OB_MODE_TEXTURE_PAINT) || editing) { - mask |= CD_MASK_MTFACE | CD_MASK_MCOL; + mask |= CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL; } /* check if we need mcols due to vertex paint or weightpaint */ if (ob->mode & OB_MODE_VERTEX_PAINT) { - mask |= CD_MASK_MCOL; + mask |= CD_MASK_MLOOPCOL; } if (ob->mode & OB_MODE_WEIGHT_PAINT) { - mask |= CD_MASK_PREVIEW_MCOL; + mask |= CD_MASK_PREVIEW_MLOOPCOL; } if (ob->mode & OB_MODE_EDIT) diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 2a3bccaeaea..5945a342738 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -515,7 +515,7 @@ static void cdDM_drawFacesTex_common( colType = CD_TEXTURE_MLOOPCOL; mloopcol = dm->getLoopDataArray(dm, colType); if (!mloopcol) { - colType = CD_PREVIEW_MCOL; + colType = CD_PREVIEW_MLOOPCOL; mloopcol = dm->getLoopDataArray(dm, colType); } if (!mloopcol) { diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 880241a7cc7..12d6bf72742 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -325,7 +325,7 @@ bool dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, Object if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) { if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) { Mesh *me = ob->data; - return (CustomData_get_named_layer_index(&me->fdata, CD_MCOL, name) != -1); + return (CustomData_get_named_layer_index(&me->ldata, CD_MLOOPCOL, name) != -1); } else if (surface->type == MOD_DPAINT_SURFACE_T_WEIGHT) return (defgroup_name_index(ob, surface->output_name) != -1); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 7f2883a1f80..32cded7f2a3 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -3048,7 +3048,7 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm, colType = CD_TEXTURE_MLOOPCOL; mloopcol = dm->getLoopDataArray(dm, colType); if (!mloopcol) { - colType = CD_PREVIEW_MCOL; + colType = CD_PREVIEW_MLOOPCOL; mloopcol = dm->getLoopDataArray(dm, colType); } if (!mloopcol) { diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index cafc773c48c..23f388d2a58 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -83,8 +83,8 @@ static bool vertex_paint_use_fast_update_check(Object *ob) if (dm) { Mesh *me = BKE_mesh_from_object(ob); - if (me && me->mcol) { - return (me->mcol == CustomData_get_layer(&dm->faceData, CD_MCOL)); + if (me && me->mloopcol) { + return (me->mloopcol == CustomData_get_layer(&dm->loopData, CD_MLOOPCOL)); } } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 3e5374f7d31..0f4e05c230b 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2619,7 +2619,7 @@ CustomDataMask ED_view3d_datamask(const Scene *scene, const View3D *v3d) if (ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) || ((v3d->drawtype == OB_SOLID) && (v3d->flag2 & V3D_SOLID_TEX))) { - mask |= CD_MASK_MTFACE | CD_MASK_MCOL; + mask |= CD_MASK_MTEXPOLY | CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL; if (BKE_scene_use_new_shading_nodes(scene)) { if (v3d->drawtype == OB_MATERIAL) diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index e8eacb269f3..a446f119132 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -175,7 +175,7 @@ static void dupli_render_particle_set(Scene *scene, Object *ob, int level, int e /* this is to make sure we get render level duplis in groups: * the derivedmesh must be created before init_render_mesh, * since object_duplilist does dupliparticles before that */ - dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH | CD_MASK_MTFACE | CD_MASK_MCOL); + dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH | CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL); dm->release(dm); for (psys = ob->particlesystem.first; psys; psys = psys->next) diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index 95bc4706dc9..f1b6ceb070c 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -76,24 +76,24 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ || surface->init_color_type == MOD_DPAINT_INITIAL_TEXTURE) { - dataMask |= (1 << CD_MTFACE); + dataMask |= CD_MASK_MLOOPUV | CD_MASK_MTEXPOLY; } /* mcol */ if (surface->type == MOD_DPAINT_SURFACE_T_PAINT || surface->init_color_type == MOD_DPAINT_INITIAL_VERTEXCOLOR) { - dataMask |= (1 << CD_MCOL); + dataMask |= CD_MASK_MLOOPCOL; } /* CD_MDEFORMVERT */ if (surface->type == MOD_DPAINT_SURFACE_T_WEIGHT) { - dataMask |= (1 << CD_MDEFORMVERT); + dataMask |= CD_MASK_MDEFORMVERT; } } } if (pmd->brush) { if (pmd->brush->flags & MOD_DPAINT_USE_MATERIAL) { - dataMask |= (1 << CD_MTFACE); + dataMask |= CD_MASK_MLOOPUV | CD_MASK_MTEXPOLY; } } return dataMask;