Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_weighted_normal.c
| Show First 20 Lines • Show All 540 Lines • ▼ Show 20 Lines | static void wn_face_with_angle(WeightedNormalModifierData *wnmd, WeightedNormalData *wn_data) | ||||
| qsort(combined, numLoops, sizeof(*combined), modepair_cmp_by_val_inverse); | qsort(combined, numLoops, sizeof(*combined), modepair_cmp_by_val_inverse); | ||||
| wn_data->loop_to_poly = loop_to_poly; | wn_data->loop_to_poly = loop_to_poly; | ||||
| wn_data->mode_pair = combined; | wn_data->mode_pair = combined; | ||||
| apply_weights_vertex_normal(wnmd, wn_data); | apply_weights_vertex_normal(wnmd, wn_data); | ||||
| } | } | ||||
| static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) | static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) | ||||
| { | { | ||||
| WeightedNormalModifierData *wnmd = (WeightedNormalModifierData *)md; | WeightedNormalModifierData *wnmd = (WeightedNormalModifierData *)md; | ||||
| Object *ob = ctx->object; | Object *ob = ctx->object; | ||||
| /* XXX TODO(Rohan Rathi): | /* XXX TODO(Rohan Rathi): | ||||
| * Once we fully switch to Mesh evaluation of modifiers, | * Once we fully switch to Mesh evaluation of modifiers, | ||||
| * we can expect to get that flag from the COW copy. | * we can expect to get that flag from the COW copy. | ||||
| * But for now, it is lost in the DM intermediate step, | * But for now, it is lost in the DM intermediate step, | ||||
| ▲ Show 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | | ||||
| eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, | ||||
| /* 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 */ dependsOnNormals, | /* dependsOnNormals */ dependsOnNormals, | ||||
| /* foreachObjectLink */ NULL, | /* foreachObjectLink */ NULL, | ||||
| /* foreachIDLink */ NULL, | /* foreachIDLink */ NULL, | ||||
| /* foreachTexLink */ NULL, | /* foreachTexLink */ NULL, | ||||
| /* freeRuntimeData */ NULL, | /* freeRuntimeData */ NULL, | ||||
| }; | }; | ||||