diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-11-10 03:03:31 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-11-10 03:03:31 +0300 |
commit | 51efe7de27119587c918a1e5cc429acca8ca672f (patch) | |
tree | 464c39158e29a8063517a6dce9f49cf690ecedfc /source/blender/freestyle/intern/application | |
parent | b65008dd6f113974bdf67082eea5ec10c93913b7 (diff) |
Improved context handling. Previously FRS_initialize() was used for both
initializing Freestyle and specifying contexts, making the API a bit messy.
Now FRS_initialize() is only for initialization, and contexts are specified
by new FRS_set_context() function just before starting rendering.
Diffstat (limited to 'source/blender/freestyle/intern/application')
-rwxr-xr-x | source/blender/freestyle/intern/application/Controller.cpp | 11 | ||||
-rwxr-xr-x | source/blender/freestyle/intern/application/Controller.h | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index 6b7f095c6ac..46f45f139fe 100755 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -71,7 +71,7 @@ extern "C" { -Controller::Controller(bContext* C) +Controller::Controller() { const string sep(Config::DIR_SEP.c_str()); @@ -108,7 +108,7 @@ Controller::Controller(bContext* C) _Canvas = new AppCanvas; - _inter = new PythonInterpreter(C); + _inter = new PythonInterpreter(); _EnableQI = true; _ComputeRidges = true; _ComputeSteerableViewMap = false; @@ -175,6 +175,13 @@ void Controller::setView(AppView *iView) _Canvas->setViewer(_pView); } +void Controller::setContext(bContext *C) +{ + PythonInterpreter* py_inter = dynamic_cast<PythonInterpreter*>(_inter); + assert(py_inter != 0); + py_inter->setContext(C); +} + int Controller::LoadMesh(Render *re, SceneRenderLayer* srl) { diff --git a/source/blender/freestyle/intern/application/Controller.h b/source/blender/freestyle/intern/application/Controller.h index 99d85434811..4734462b7a5 100755 --- a/source/blender/freestyle/intern/application/Controller.h +++ b/source/blender/freestyle/intern/application/Controller.h @@ -66,10 +66,11 @@ extern "C" { class Controller { public: - Controller(bContext* C) ; + Controller() ; ~Controller() ; void setView(AppView *iView); + void setContext(bContext *C); //soc void init_options(); |