diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_wireframe.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_wireframe.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_wireframe.c b/source/blender/modifiers/intern/MOD_wireframe.c index 602e0bf3eda..206c514826c 100644 --- a/source/blender/modifiers/intern/MOD_wireframe.c +++ b/source/blender/modifiers/intern/MOD_wireframe.c @@ -24,6 +24,7 @@ #include "BLT_translation.h" +#include "DNA_defaults.h" #include "DNA_mesh_types.h" #include "DNA_object_types.h" #include "DNA_screen_types.h" @@ -47,9 +48,10 @@ static void initData(ModifierData *md) { WireframeModifierData *wmd = (WireframeModifierData *)md; - wmd->offset = 0.02f; - wmd->flag = MOD_WIREFRAME_REPLACE | MOD_WIREFRAME_OFS_EVEN; - wmd->crease_weight = 1.0f; + + BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(wmd, modifier)); + + MEMCPY_STRUCT_AFTER(wmd, DNA_struct_default_get(WireframeModifierData), modifier); } static void requiredDataMask(Object *UNUSED(ob), @@ -180,8 +182,10 @@ ModifierTypeInfo modifierType_Wireframe = { /* name */ "Wireframe", /* structName */ "WireframeModifierData", /* structSize */ sizeof(WireframeModifierData), + /* srna */ &RNA_WireframeModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_WIREFRAME, /* copyData */ BKE_modifier_copydata_generic, @@ -201,7 +205,6 @@ ModifierTypeInfo modifierType_Wireframe = { /* updateDepgraph */ NULL, /* dependsOnTime */ NULL, /* dependsOnNormals */ dependsOnNormals, - /* foreachObjectLink */ NULL, /* foreachIDLink */ NULL, /* foreachTexLink */ NULL, /* freeRuntimeData */ NULL, |