diff options
author | Julian Eisel <julian@blender.org> | 2020-07-01 18:25:04 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-07-01 18:25:04 +0300 |
commit | 889c4ca9c26d770af02cedef972d65eb173bdb5e (patch) | |
tree | 6f46156146db1b3f09d92c6eaa1f44ba8a584ed4 /source/blender/modifiers/intern/MOD_warp.c | |
parent | 87df15190210eb84ef52e5dccc2932918f912da5 (diff) | |
parent | 0829cebeb024095c268f190c34daa8ae9a5a224c (diff) |
Merge branch 'asset-uuid--archived' into asset-engine--archivedasset-engine--archived
Diffstat (limited to 'source/blender/modifiers/intern/MOD_warp.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_warp.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index b32efa3fb8f..2b67b26e620 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -49,6 +49,8 @@ #include "UI_interface.h" #include "UI_resources.h" +#include "BLO_read_write.h" + #include "RNA_access.h" #include "DEG_depsgraph.h" @@ -510,6 +512,25 @@ static void panelRegister(ARegionType *region_type) region_type, "texture", "Texture", NULL, texture_panel_draw, panel_type); } +static void blendWrite(BlendWriter *writer, const ModifierData *md) +{ + const WarpModifierData *tmd = (const WarpModifierData *)md; + + if (tmd->curfalloff) { + BKE_curvemapping_blend_write(writer, tmd->curfalloff); + } +} + +static void blendRead(BlendDataReader *reader, ModifierData *md) +{ + WarpModifierData *tmd = (WarpModifierData *)md; + + BLO_read_data_address(reader, &tmd->curfalloff); + if (tmd->curfalloff) { + BKE_curvemapping_blend_read(reader, tmd->curfalloff); + } +} + ModifierTypeInfo modifierType_Warp = { /* name */ "Warp", /* structName */ "WarpModifierData", @@ -540,6 +561,6 @@ ModifierTypeInfo modifierType_Warp = { /* foreachTexLink */ foreachTexLink, /* freeRuntimeData */ NULL, /* panelRegister */ panelRegister, - /* blendWrite */ NULL, - /* blendRead */ NULL, + /* blendWrite */ blendWrite, + /* blendRead */ blendRead, }; |