diff options
author | Jacques Lucke <jacques@blender.org> | 2020-06-23 18:02:49 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-06-23 18:08:39 +0300 |
commit | 56f95297754dae0562c107737fd3e8a85b9c34df (patch) | |
tree | 5e3e5fdb6bc5de9a8f34f15933c871282a379993 /source/blender/blenloader/intern/writefile.c | |
parent | f345625ded0ac3507c69160654360ebe8a463c84 (diff) |
Refactor: move blenloader code of curve profile to blenkernel
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 8f87ff78ab5..898e43a2c44 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -158,6 +158,7 @@ #include "BKE_colortools.h" #include "BKE_constraint.h" #include "BKE_curve.h" +#include "BKE_curveprofile.h" #include "BKE_fcurve.h" #include "BKE_fcurve_driver.h" #include "BKE_global.h" // for G @@ -968,12 +969,6 @@ static void write_animdata(BlendWriter *writer, AnimData *adt) write_nladata(writer, &adt->nla_tracks); } -static void write_CurveProfile(BlendWriter *writer, CurveProfile *profile) -{ - BLO_write_struct(writer, CurveProfile, profile); - BLO_write_struct_array(writer, CurveProfilePoint, profile->path_len, profile->path); -} - static void write_node_socket_default_value(BlendWriter *writer, bNodeSocket *sock) { if (sock->default_value == NULL) { @@ -1751,7 +1746,7 @@ static void write_modifiers(BlendWriter *writer, ListBase *modbase) else if (md->type == eModifierType_Bevel) { BevelModifierData *bmd = (BevelModifierData *)md; if (bmd->custom_profile) { - write_CurveProfile(writer, bmd->custom_profile); + BKE_curveprofile_blend_write(writer, bmd->custom_profile); } } @@ -2594,7 +2589,7 @@ static void write_scene(BlendWriter *writer, Scene *sce, const void *id_address) } /* Write the curve profile to the file. */ if (tos->custom_bevel_profile_preset) { - write_CurveProfile(writer, tos->custom_bevel_profile_preset); + BKE_curveprofile_blend_write(writer, tos->custom_bevel_profile_preset); } write_paint(writer, &tos->imapaint.paint); |