diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_blendfile.h | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blendfile.c | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_blendfile.h b/source/blender/blenkernel/BKE_blendfile.h index ac58451e412..1cf8a78fef3 100644 --- a/source/blender/blenkernel/BKE_blendfile.h +++ b/source/blender/blenkernel/BKE_blendfile.h @@ -58,8 +58,7 @@ struct UserDef *BKE_blendfile_userdef_read_from_memory( const void *filebuf, int filelength, struct ReportList *reports); -int BKE_blendfile_userdef_write(const char *filepath, struct ReportList *reports); - +bool BKE_blendfile_userdef_write(const char *filepath, struct ReportList *reports); /* partial blend file writing */ void BKE_blendfile_write_partial_tag_ID(struct ID *id, bool set); diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 980df05aca2..99e3769572a 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -497,19 +497,22 @@ UserDef *BKE_blendfile_userdef_read_from_memory( } -/* only write the userdef in a .blend */ -int BKE_blendfile_userdef_write(const char *filepath, ReportList *reports) +/** + * Only write the userdef in a .blend + * \return success + */ +bool BKE_blendfile_userdef_write(const char *filepath, ReportList *reports) { Main *mainb = MEM_callocN(sizeof(Main), "empty main"); - int retval = 0; + bool ok = false; if (BLO_write_file(mainb, filepath, G_FILE_USERPREFS, reports, NULL)) { - retval = 1; + ok = true; } MEM_freeN(mainb); - return retval; + return ok; } /** \} */ |