diff options
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 2966a030f63..3390d30ad5d 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -139,6 +139,7 @@ #include "DNA_workspace_types.h" #include "DNA_movieclip_types.h" #include "DNA_mask_types.h" +#include "DNA_curveprofile_types.h" #include "MEM_guardedalloc.h" // MEM_freeN #include "BLI_bitmap.h" @@ -953,6 +954,12 @@ static void write_curvemapping(WriteData *wd, CurveMapping *cumap) write_curvemapping_curves(wd, cumap); } +static void write_CurveProfile(WriteData *wd, CurveProfile *profile) +{ + writestruct(wd, DATA, CurveProfile, 1, profile); + writestruct(wd, DATA, CurveProfilePoint, profile->path_len, profile->path); +} + static void write_node_socket(WriteData *wd, bNodeSocket *sock) { /* actual socket writing */ @@ -1759,6 +1766,12 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) } } } + else if (md->type == eModifierType_Bevel) { + BevelModifierData *bmd = (BevelModifierData *)md; + if (bmd->custom_profile) { + write_CurveProfile(wd, bmd->custom_profile); + } + } } } @@ -2533,6 +2546,10 @@ static void write_scene(WriteData *wd, Scene *sce) if (tos->gp_sculpt.cur_primitive) { write_curvemapping(wd, tos->gp_sculpt.cur_primitive); } + /* Write the curve profile to the file. */ + if (tos->custom_bevel_profile_preset) { + write_CurveProfile(wd, tos->custom_bevel_profile_preset); + } write_paint(wd, &tos->imapaint.paint); |