Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_decimate.c
| Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | static void updateFaceCount(const ModifierEvalContext *ctx, | ||||
| if (DEG_is_active(ctx->depsgraph)) { | if (DEG_is_active(ctx->depsgraph)) { | ||||
| /* update for display only */ | /* update for display only */ | ||||
| DecimateModifierData *dmd_orig = getOriginalModifierData(dmd, ctx); | DecimateModifierData *dmd_orig = getOriginalModifierData(dmd, ctx); | ||||
| dmd_orig->face_count = face_count; | dmd_orig->face_count = face_count; | ||||
| } | } | ||||
| } | } | ||||
| static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mesh *meshData) | static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *meshData) | ||||
| { | { | ||||
| DecimateModifierData *dmd = (DecimateModifierData *)md; | DecimateModifierData *dmd = (DecimateModifierData *)md; | ||||
| Mesh *mesh = meshData, *result = NULL; | Mesh *mesh = meshData, *result = NULL; | ||||
| BMesh *bm; | BMesh *bm; | ||||
| bool calc_face_normal; | bool calc_face_normal; | ||||
| float *vweights = NULL; | float *vweights = NULL; | ||||
| #ifdef USE_TIMEIT | #ifdef USE_TIMEIT | ||||
| ▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | ModifierTypeInfo modifierType_Decimate = { | ||||
| /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, | /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, | ||||
| /* copyData */ modifier_copyData_generic, | /* copyData */ modifier_copyData_generic, | ||||
| /* deformVerts */ NULL, | /* deformVerts */ NULL, | ||||
| /* deformMatrices */ NULL, | /* deformMatrices */ NULL, | ||||
| /* deformVertsEM */ NULL, | /* deformVertsEM */ NULL, | ||||
| /* deformMatricesEM */ NULL, | /* deformMatricesEM */ NULL, | ||||
| /* applyModifier */ applyModifier, | /* modifyMesh */ modifyMesh, | ||||
| /* modifyHair */ NULL, | |||||
| /* modifyPointCloud */ NULL, | |||||
| /* modifyVolume */ NULL, | |||||
| /* initData */ initData, | /* initData */ initData, | ||||
| /* requiredDataMask */ requiredDataMask, | /* requiredDataMask */ requiredDataMask, | ||||
| /* freeData */ NULL, | /* freeData */ NULL, | ||||
| /* isDisabled */ NULL, | /* isDisabled */ NULL, | ||||
| /* updateDepsgraph */ NULL, | /* updateDepsgraph */ NULL, | ||||
| /* dependsOnTime */ NULL, | /* dependsOnTime */ NULL, | ||||
| /* dependsOnNormals */ NULL, | /* dependsOnNormals */ NULL, | ||||
| /* foreachObjectLink */ NULL, | /* foreachObjectLink */ NULL, | ||||
| /* foreachIDLink */ NULL, | /* foreachIDLink */ NULL, | ||||
| /* foreachTexLink */ NULL, | /* foreachTexLink */ NULL, | ||||
| /* freeRuntimeData */ NULL, | /* freeRuntimeData */ NULL, | ||||
| }; | }; | ||||