diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-10 17:25:39 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-10 17:25:39 +0400 |
commit | e052fc9819cf295988c6c9bfd9cc25ac1057b5e8 (patch) | |
tree | 76a9c03f2eaf8cbaf678b4c9104f394ecbc45904 /source | |
parent | b6bdb122c2a0fba356541340664ef76698db7544 (diff) |
Fix #36271: missing (+) icon for toolbar in compositing layout in default startup.blend.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_blender.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 34 |
2 files changed, 35 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 519d0c7fd6b..f434bcf3cad 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -42,7 +42,7 @@ extern "C" { * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ #define BLENDER_VERSION 268 -#define BLENDER_SUBVERSION 4 +#define BLENDER_SUBVERSION 5 /* 262 was the last editmesh release but it has compatibility code for bmesh data */ #define BLENDER_MINVERSION 262 #define BLENDER_MINSUBVERSION 0 diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index af2da2361d3..f2566980d9b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9653,6 +9653,40 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if (!MAIN_VERSION_ATLEAST(main, 268, 5)) { + bScreen *sc; + ScrArea *sa; + + /* add missing (+) expander in node editor */ + for (sc = main->screen.first; sc; sc = sc->id.next) { + for (sa = sc->areabase.first; sa; sa = sa->next) { + ARegion *ar, *arnew; + + if (sa->spacetype == SPACE_NODE) { + ar = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS); + + if (ar) + continue; + + /* add subdiv level; after header */ + ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + + /* is error! */ + if (ar == NULL) + continue; + + arnew = MEM_callocN(sizeof(ARegion), "node tools"); + + BLI_insertlinkafter(&sa->regionbase, ar, arnew); + arnew->regiontype = RGN_TYPE_TOOLS; + arnew->alignment = RGN_ALIGN_LEFT; + + arnew->flag = RGN_FLAG_HIDDEN; + } + } + } + } + /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init see do_versions_userdef() above! */ |