Cleanup: Remove unused DerivedMesh flag

The value of this flag was never used.
This commit is contained in:
Hans Goudey 2022-01-30 18:11:20 -06:00
parent 23775f3914
commit 79032a8513
6 changed files with 0 additions and 25 deletions

View File

@ -104,11 +104,6 @@ typedef enum DerivedMeshType {
DM_TYPE_CCGDM,
} DerivedMeshType;
typedef enum DMDirtyFlag {
/* dm has valid tessellated faces, but tessellated CDDATA need to be updated. */
DM_DIRTY_TESS_CDLAYERS = 1 << 0,
} DMDirtyFlag;
typedef struct DerivedMesh DerivedMesh;
struct DerivedMesh {
/** Private DerivedMesh data, only for internal DerivedMesh use */
@ -117,7 +112,6 @@ struct DerivedMesh {
int needsFree; /* checked on ->release, is set to 0 for cached results */
int deformedOnly; /* set by modifier stack if only deformed from original */
DerivedMeshType type;
DMDirtyFlag dirty;
/**
* \warning Typical access is done via #getLoopTriArray, #getNumLoopTri.

View File

@ -275,7 +275,6 @@ void DM_init(DerivedMesh *dm,
DM_init_funcs(dm);
dm->needsFree = 1;
dm->dirty = (DMDirtyFlag)0;
/* Don't use #CustomData_reset because we don't want to touch custom-data. */
copy_vn_i(dm->vertData.typemap, CD_NUMTYPES, -1);
@ -313,7 +312,6 @@ void DM_from_template_ex(DerivedMesh *dm,
DM_init_funcs(dm);
dm->needsFree = 1;
dm->dirty = (DMDirtyFlag)0;
}
void DM_from_template(DerivedMesh *dm,
DerivedMesh *source,

View File

@ -238,9 +238,6 @@ static DerivedMesh *cdDM_from_mesh_ex(Mesh *mesh,
dm->deformedOnly = 1;
dm->cd_flag = mesh->cd_flag;
/* TODO: DM_DIRTY_TESS_CDLAYERS ? Maybe not though,
* since we probably want to switch to looptris? */
CustomData_merge(&mesh->vdata, &dm->vertData, cddata_masks.vmask, alloctype, mesh->totvert);
CustomData_merge(&mesh->edata, &dm->edgeData, cddata_masks.emask, alloctype, mesh->totedge);
CustomData_merge(&mesh->fdata,
@ -299,12 +296,6 @@ DerivedMesh *CDDM_copy(DerivedMesh *source)
DM_from_template(dm, source, DM_TYPE_CDDM, numVerts, numEdges, numTessFaces, numLoops, numPolys);
dm->deformedOnly = source->deformedOnly;
dm->cd_flag = source->cd_flag;
dm->dirty = source->dirty;
/* Tessellation data is never copied, so tag it here.
* Only tag dirty layers if we really ignored tessellation faces.
*/
dm->dirty |= DM_DIRTY_TESS_CDLAYERS;
CustomData_copy_data(&source->vertData, &dm->vertData, 0, 0, numVerts);
CustomData_copy_data(&source->edgeData, &dm->edgeData, 0, 0, numEdges);

View File

@ -1985,9 +1985,6 @@ static Mesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd, Object *
}
MEM_freeN(fcolor);
/* Mark tessellated CD layers as dirty. */
// result->dirty |= DM_DIRTY_TESS_CDLAYERS;
}
/* vertex group paint */
else if (surface->type == MOD_DPAINT_SURFACE_T_WEIGHT) {

View File

@ -336,8 +336,6 @@ static void normalEditModifier_do_radial(NormalEditModifierData *enmd,
if (do_polynors_fix &&
polygons_check_flip(
mloop, nos, &mesh->ldata, mpoly, BKE_mesh_poly_normals_for_write(mesh), num_polys)) {
/* XXX TODO: is this still needed? */
// mesh->dirty |= DM_DIRTY_TESS_CDLAYERS;
/* We need to recompute vertex normals! */
BKE_mesh_normals_tag_dirty(mesh);
}

View File

@ -233,9 +233,6 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
settings.use_threading = (numPolys > 1000);
BLI_task_parallel_range(0, numPolys, &data, uv_warp_compute, &settings);
/* XXX TODO: is this still needed? */
// me_eval->dirty |= DM_DIRTY_TESS_CDLAYERS;
mesh->runtime.is_original = false;
return mesh;