Fix #36271: missing (+) icon for toolbar in compositing layout in default startup...
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 10 Sep 2013 13:25:39 +0000 (13:25 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 10 Sep 2013 13:25:39 +0000 (13:25 +0000)
source/blender/blenkernel/BKE_blender.h
source/blender/blenloader/intern/readfile.c

index 519d0c7fd6b135fa97891fd15929f7c23437122e..f434bcf3cad4cf043a6a4d26a3af930fbdf1568f 100644 (file)
@@ -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
index af2da2361d398e76e86bf5f603496288ce8c9012..f2566980d9b0c1054744e81fa65bf4c046c14cd9 100644 (file)
@@ -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! */