diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 6 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a169dc82d1f..22bd3ee3a17 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8713,6 +8713,12 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead) user->uifonts.first = user->uifonts.last= NULL; link_list(fd, &user->uistyles); + link_list(fd, &user->user_menu_items); + + for (bUserMenuItem *umi = user->user_menu_items.first; umi; umi = umi->next) { + umi->prop = newdataadr(fd, umi->prop); + IDP_DirectLinkGroup_OrFree(&umi->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd); + } /* free fd->datamap again */ oldnewmap_free_unused(fd->datamap); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 9c55c949fcf..5652ad895d3 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1258,6 +1258,13 @@ static void write_userdef(WriteData *wd, const UserDef *userdef) for (const uiStyle *style = userdef->uistyles.first; style; style = style->next) { writestruct(wd, DATA, uiStyle, 1, style); } + + for (const bUserMenuItem *umi = userdef->user_menu_items.first; umi; umi = umi->next) { + writestruct(wd, DATA, bUserMenuItem, 1, umi); + if (umi->prop) { + IDP_WriteProperty(umi->prop, wd); + } + } } static void write_boid_state(WriteData *wd, BoidState *state) |