Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_laplaciandeform.c
| Show All 25 Lines | |||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #include "BLI_utildefines_stack.h" | #include "BLI_utildefines_stack.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.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_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_deform.h" | #include "BKE_deform.h" | ||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| #include "BKE_lib_id.h" | #include "BKE_lib_id.h" | ||||
| ▲ Show 20 Lines • Show All 684 Lines • ▼ Show 20 Lines | static void LaplacianDeformModifier_do( | ||||
| if (sys && sys->is_matrix_computed && !sys->has_solution) { | if (sys && sys->is_matrix_computed && !sys->has_solution) { | ||||
| BKE_modifier_set_error(&lmd->modifier, "The system did not find a solution"); | BKE_modifier_set_error(&lmd->modifier, "The system did not find a solution"); | ||||
| } | } | ||||
| } | } | ||||
| static void initData(ModifierData *md) | static void initData(ModifierData *md) | ||||
| { | { | ||||
| LaplacianDeformModifierData *lmd = (LaplacianDeformModifierData *)md; | LaplacianDeformModifierData *lmd = (LaplacianDeformModifierData *)md; | ||||
| lmd->anchor_grp_name[0] = '\0'; | |||||
| lmd->total_verts = 0; | BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(lmd, modifier)); | ||||
| lmd->repeat = 1; | |||||
| lmd->vertexco = NULL; | MEMCPY_STRUCT_AFTER(lmd, DNA_struct_default_get(LaplacianDeformModifierData), modifier); | ||||
| lmd->cache_system = NULL; | |||||
| lmd->flag = 0; | |||||
| } | } | ||||
| static void copyData(const ModifierData *md, ModifierData *target, const int flag) | static void copyData(const ModifierData *md, ModifierData *target, const int flag) | ||||
| { | { | ||||
| const LaplacianDeformModifierData *lmd = (const LaplacianDeformModifierData *)md; | const LaplacianDeformModifierData *lmd = (const LaplacianDeformModifierData *)md; | ||||
| LaplacianDeformModifierData *tlmd = (LaplacianDeformModifierData *)target; | LaplacianDeformModifierData *tlmd = (LaplacianDeformModifierData *)target; | ||||
| BKE_modifier_copydata_generic(md, target, flag); | BKE_modifier_copydata_generic(md, target, flag); | ||||
| ▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines | |||||