Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_cast.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 "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_deform.h" | #include "BKE_deform.h" | ||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| Show All 13 Lines | |||||
| #include "MOD_ui_common.h" | #include "MOD_ui_common.h" | ||||
| #include "MOD_util.h" | #include "MOD_util.h" | ||||
| static void initData(ModifierData *md) | static void initData(ModifierData *md) | ||||
| { | { | ||||
| CastModifierData *cmd = (CastModifierData *)md; | CastModifierData *cmd = (CastModifierData *)md; | ||||
| cmd->fac = 0.5f; | BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(cmd, modifier)); | ||||
| cmd->radius = 0.0f; | |||||
| cmd->size = 0.0f; | MEMCPY_STRUCT_AFTER(cmd, DNA_struct_default_get(CastModifierData), modifier); | ||||
| cmd->flag = MOD_CAST_X | MOD_CAST_Y | MOD_CAST_Z | MOD_CAST_SIZE_FROM_RADIUS; | |||||
| cmd->type = MOD_CAST_TYPE_SPHERE; | |||||
| cmd->defgrp_name[0] = '\0'; | |||||
| cmd->object = NULL; | |||||
| } | } | ||||
| static bool isDisabled(const struct Scene *UNUSED(scene), | static bool isDisabled(const struct Scene *UNUSED(scene), | ||||
| ModifierData *md, | ModifierData *md, | ||||
| bool UNUSED(useRenderParams)) | bool UNUSED(useRenderParams)) | ||||
| { | { | ||||
| CastModifierData *cmd = (CastModifierData *)md; | CastModifierData *cmd = (CastModifierData *)md; | ||||
| short flag; | short flag; | ||||
| ▲ Show 20 Lines • Show All 538 Lines • Show Last 20 Lines | |||||