Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_wave.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_scene_types.h" | #include "DNA_scene_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" | ||||
| Show All 20 Lines | |||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| static void initData(ModifierData *md) | static void initData(ModifierData *md) | ||||
| { | { | ||||
| WaveModifierData *wmd = (WaveModifierData *)md; // whadya know, moved here from Iraq | WaveModifierData *wmd = (WaveModifierData *)md; // whadya know, moved here from Iraq | ||||
| wmd->flag |= (MOD_WAVE_X | MOD_WAVE_Y | MOD_WAVE_CYCL | MOD_WAVE_NORM_X | MOD_WAVE_NORM_Y | | BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(wmd, modifier)); | ||||
| MOD_WAVE_NORM_Z); | |||||
| wmd->objectcenter = NULL; | MEMCPY_STRUCT_AFTER(wmd, DNA_struct_default_get(WaveModifierData), modifier); | ||||
| wmd->texture = NULL; | |||||
| wmd->map_object = NULL; | |||||
| wmd->height = 0.5f; | |||||
| wmd->width = 1.5f; | |||||
| wmd->speed = 0.25f; | |||||
| wmd->narrow = 1.5f; | |||||
| wmd->lifetime = 0.0f; | |||||
| wmd->damp = 10.0f; | |||||
| wmd->falloff = 0.0f; | |||||
| wmd->texmapping = MOD_DISP_MAP_LOCAL; | |||||
| wmd->defgrp_name[0] = 0; | |||||
| } | } | ||||
| static bool dependsOnTime(ModifierData *UNUSED(md)) | static bool dependsOnTime(ModifierData *UNUSED(md)) | ||||
| { | { | ||||
| return true; | return true; | ||||
| } | } | ||||
| static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) | static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) | ||||
| ▲ Show 20 Lines • Show All 443 Lines • Show Last 20 Lines | |||||