selecting a new scripts dir didnt rebuild the menu's
authorCampbell Barton <ideasman42@gmail.com>
Fri, 4 Apr 2008 16:11:27 +0000 (16:11 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 4 Apr 2008 16:11:27 +0000 (16:11 +0000)
source/blender/src/headerbuttons.c

index b5c22c9bc1b265879eced18b8e4d2fb655d7c0d7..bc7513bbb16138fa47712f77b748a9d163435e20 100644 (file)
@@ -543,9 +543,14 @@ static void filesel_u_pythondir(char *name)
 
        BLI_cleanup_dir(G.sce, name);
        BLI_split_dirfile(name, dir, file);
-
+       
        strcpy(U.pythondir, dir);
        allqueue(REDRAWALL, 0);
+       
+       /* act on the change */
+       BPyMenu_RemoveAllEntries();
+       BPY_rebuild_syspath();
+       if (BPyMenu_Init(1) == -1) error("Invalid scripts dir: check console");
 }
 
 static void filesel_u_sounddir(char *name)