Revision: 21680
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21680
Author:   kjym3
Date:     2009-07-18 20:33:07 +0200 (Sat, 18 Jul 2009)

Log Message:
-----------
Fixed a bug that the parameter panel did not correctly work when
a new file was created or an existing file was loaded.

Modified Paths:
--------------
    
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp
    branches/soc-2008-mxcurioni/source/blender/src/buttons_scene.c
    branches/soc-2008-mxcurioni/source/blender/src/usiblender.c

Modified: 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp
===================================================================
--- 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp
   2009-07-18 16:27:25 UTC (rev 21679)
+++ 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp
   2009-07-18 18:33:07 UTC (rev 21680)
@@ -83,17 +83,22 @@
                        controller = new Controller;
                        view = new AppView;
                        controller->setView(view);
+
+               } else {
+
+                       delete panelConfig;
+
+               }
+
+               panelConfig = new FreestylePanelConfigurationData;
                        
-                       panelConfig = new FreestylePanelConfigurationData;
+               default_module_path = pathconfig->getProjectDir() + 
Config::DIR_SEP + "style_modules" + Config::DIR_SEP + "contour.py";
+               FRS_select_layer( (SceneRenderLayer*) 
BLI_findlink(&G.scene->r.layers, G.scene->r.actlay) );
                        
-                       default_module_path = pathconfig->getProjectDir() + 
Config::DIR_SEP + "style_modules" + Config::DIR_SEP + "contour.py";
-                       FRS_select_layer( (SceneRenderLayer*) 
BLI_findlink(&G.scene->r.layers, G.scene->r.actlay) );
-                       
-                       freestyle_is_initialized = 1;
-               }
+               freestyle_is_initialized = 1;
                
        }
-       
+
        void FRS_exit() {
                delete pathconfig;
                delete controller;
@@ -252,7 +257,6 @@
                cout << "#  Freestyle" << endl;
                cout << 
"#===============================================================" << endl;
                
-               FRS_initialize();
                init_view(re);
                init_camera(re);
                

Modified: branches/soc-2008-mxcurioni/source/blender/src/buttons_scene.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/src/buttons_scene.c      
2009-07-18 16:27:25 UTC (rev 21679)
+++ branches/soc-2008-mxcurioni/source/blender/src/buttons_scene.c      
2009-07-18 18:33:07 UTC (rev 21680)
@@ -3317,9 +3317,6 @@
        StyleModuleConf* module_conf;
        int module_number, last_module_number;
        
-       // initialization
-       FRS_initialize();
-
        // block
        block = uiNewBlock(&curarea->uiblocks, "render_panel_freestyle", 
UI_EMBOSS, UI_HELV, curarea->win);
        uiNewPanelTabbed("Render", "Render");

Modified: branches/soc-2008-mxcurioni/source/blender/src/usiblender.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/src/usiblender.c 2009-07-18 
16:27:25 UTC (rev 21679)
+++ branches/soc-2008-mxcurioni/source/blender/src/usiblender.c 2009-07-18 
18:33:07 UTC (rev 21680)
@@ -154,6 +154,8 @@
 #include "GPU_extensions.h"
 #include "GPU_draw.h"
 
+#include "FRS_freestyle.h"
+
 /***/
 
 /* define for setting colors in theme below */
@@ -603,6 +605,8 @@
                
                if (retval!=0) G.relbase_valid = 1;
 
+               FRS_initialize();
+
                undo_editmode_clear();
                undo_imagepaint_clear();
                BKE_reset_undo();
@@ -677,6 +681,8 @@
        
        init_userdef_file();
 
+       FRS_initialize();
+
        undo_editmode_clear();
        undo_imagepaint_clear();
        BKE_reset_undo();


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to