Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-07-18 22:33:07 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-07-18 22:33:07 +0400
commitef11c4e8e744cbd64895f27a1f26636cc5c2b047 (patch)
tree52d55034a3414ad1d2458b50f567a3a5e66c96e5 /source
parente7f3a3d93a79ac57525ecc2735e5a33cb1757ca7 (diff)
Fixed a bug that the parameter panel did not correctly work when
a new file was created or an existing file was loaded.
Diffstat (limited to 'source')
-rw-r--r--source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp20
-rw-r--r--source/blender/src/buttons_scene.c3
-rw-r--r--source/blender/src/usiblender.c6
3 files changed, 18 insertions, 11 deletions
diff --git a/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp b/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp
index c65d71452a7..34e6e31a177 100644
--- a/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/app_blender/FRS_freestyle.cpp
@@ -83,17 +83,22 @@ extern "C" {
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 @@ extern "C" {
cout << "# Freestyle" << endl;
cout << "#===============================================================" << endl;
- FRS_initialize();
init_view(re);
init_camera(re);
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c
index f1e98653000..9d4ff9db960 100644
--- a/source/blender/src/buttons_scene.c
+++ b/source/blender/src/buttons_scene.c
@@ -3317,9 +3317,6 @@ static void render_panel_freestyle()
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");
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index c889fad1caf..5cd369ea937 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -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 @@ void BIF_read_file(char *name)
if (retval!=0) G.relbase_valid = 1;
+ FRS_initialize();
+
undo_editmode_clear();
undo_imagepaint_clear();
BKE_reset_undo();
@@ -677,6 +681,8 @@ int BIF_read_homefile(int from_memory)
init_userdef_file();
+ FRS_initialize();
+
undo_editmode_clear();
undo_imagepaint_clear();
BKE_reset_undo();