Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_remesh.c
| Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | static void dualcon_add_quad(void *output_v, const int vert_indices[4]) | ||||
| cur_poly->totloop = 4; | cur_poly->totloop = 4; | ||||
| for (i = 0; i < 4; i++) { | for (i = 0; i < 4; i++) { | ||||
| mloop[output->curface * 4 + i].v = vert_indices[i]; | mloop[output->curface * 4 + i].v = vert_indices[i]; | ||||
| } | } | ||||
| output->curface++; | output->curface++; | ||||
| } | } | ||||
| static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *UNUSED(ctx), Mesh *mesh) | static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *UNUSED(ctx), Mesh *mesh) | ||||
| { | { | ||||
| RemeshModifierData *rmd; | RemeshModifierData *rmd; | ||||
| DualConOutput *output; | DualConOutput *output; | ||||
| DualConInput input; | DualConInput input; | ||||
| Mesh *result; | Mesh *result; | ||||
| DualConFlags flags = 0; | DualConFlags flags = 0; | ||||
| DualConMode mode = 0; | DualConMode mode = 0; | ||||
| ▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *UNUSED(ctx), Mesh *mesh) | ||||
| BKE_mesh_copy_settings(result, mesh); | BKE_mesh_copy_settings(result, mesh); | ||||
| BKE_mesh_calc_edges(result, true, false); | BKE_mesh_calc_edges(result, true, false); | ||||
| result->runtime.cd_dirty_vert |= CD_MASK_NORMAL; | result->runtime.cd_dirty_vert |= CD_MASK_NORMAL; | ||||
| return result; | return result; | ||||
| } | } | ||||
| #else /* !WITH_MOD_REMESH */ | #else /* !WITH_MOD_REMESH */ | ||||
| static Mesh *applyModifier(ModifierData *UNUSED(md), | static Mesh *modifyMesh(ModifierData *UNUSED(md), | ||||
| const ModifierEvalContext *UNUSED(ctx), | const ModifierEvalContext *UNUSED(ctx), | ||||
| Mesh *mesh) | Mesh *mesh) | ||||
| { | { | ||||
| return mesh; | return mesh; | ||||
| } | } | ||||
| #endif /* !WITH_MOD_REMESH */ | #endif /* !WITH_MOD_REMESH */ | ||||
| ModifierTypeInfo modifierType_Remesh = { | ModifierTypeInfo modifierType_Remesh = { | ||||
| /* name */ "Remesh", | /* name */ "Remesh", | ||||
| /* structName */ "RemeshModifierData", | /* structName */ "RemeshModifierData", | ||||
| /* structSize */ sizeof(RemeshModifierData), | /* structSize */ sizeof(RemeshModifierData), | ||||
| /* type */ eModifierTypeType_Nonconstructive, | /* type */ eModifierTypeType_Nonconstructive, | ||||
| /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | | /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | | ||||
| eModifierTypeFlag_SupportsEditmode, | eModifierTypeFlag_SupportsEditmode, | ||||
| /* 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 */ NULL, | /* requiredDataMask */ NULL, | ||||
| /* 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, | ||||
| /* freeRuntimeData */ NULL, | /* freeRuntimeData */ NULL, | ||||
| }; | }; | ||||