Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_laplaciansmooth.c
| Show All 21 Lines | |||||
| */ | */ | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "DNA_defaults.h" | |||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_meshdata_types.h" | #include "DNA_meshdata_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| ▲ Show 20 Lines • Show All 454 Lines • ▼ Show 20 Lines | static void laplaciansmoothModifier_do( | ||||
| sys->context = NULL; | sys->context = NULL; | ||||
| delete_laplacian_system(sys); | delete_laplacian_system(sys); | ||||
| } | } | ||||
| static void init_data(ModifierData *md) | static void init_data(ModifierData *md) | ||||
| { | { | ||||
| LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *)md; | LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *)md; | ||||
| smd->lambda = 0.01f; | |||||
| smd->lambda_border = 0.01f; | BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(smd, modifier)); | ||||
| smd->repeat = 1; | |||||
| smd->flag = MOD_LAPLACIANSMOOTH_X | MOD_LAPLACIANSMOOTH_Y | MOD_LAPLACIANSMOOTH_Z | | MEMCPY_STRUCT_AFTER(smd, DNA_struct_default_get(LaplacianSmoothModifierData), modifier); | ||||
| MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME | MOD_LAPLACIANSMOOTH_NORMALIZED; | |||||
| smd->defgrp_name[0] = '\0'; | |||||
| } | } | ||||
| static bool is_disabled(const struct Scene *UNUSED(scene), | static bool is_disabled(const struct Scene *UNUSED(scene), | ||||
| ModifierData *md, | ModifierData *md, | ||||
| bool UNUSED(useRenderParams)) | bool UNUSED(useRenderParams)) | ||||
| { | { | ||||
| LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *)md; | LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *)md; | ||||
| short flag; | short flag; | ||||
| ▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines | |||||