diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_uvwarp.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_uvwarp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_uvwarp.c b/source/blender/modifiers/intern/MOD_uvwarp.c index f0b0149a221..f70694d3148 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.c +++ b/source/blender/modifiers/intern/MOD_uvwarp.c @@ -27,6 +27,7 @@ #include "BLT_translation.h" +#include "DNA_defaults.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_object_types.h" @@ -63,10 +64,10 @@ static void uv_warp_from_mat4_pair(float uv_dst[2], static void initData(ModifierData *md) { UVWarpModifierData *umd = (UVWarpModifierData *)md; - umd->axis_u = 0; - umd->axis_v = 1; - copy_v2_fl(umd->center, 0.5f); - copy_v2_fl(umd->scale, 1.0f); + + BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(umd, modifier)); + + MEMCPY_STRUCT_AFTER(umd, DNA_struct_default_get(UVWarpModifierData), modifier); } static void requiredDataMask(Object *UNUSED(ob), |