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
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-11-10 03:03:31 +0300
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-11-10 03:03:31 +0300
commit51efe7de27119587c918a1e5cc429acca8ca672f (patch)
tree464c39158e29a8063517a6dce9f49cf690ecedfc /source/blender/freestyle/intern/system
parentb65008dd6f113974bdf67082eea5ec10c93913b7 (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/system')
-rwxr-xr-xsource/blender/freestyle/intern/system/PythonInterpreter.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h
index e04e1d9b9d1..bf1a5064d3e 100755
--- a/source/blender/freestyle/intern/system/PythonInterpreter.h
+++ b/source/blender/freestyle/intern/system/PythonInterpreter.h
@@ -51,9 +51,9 @@ class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter
{
public:
- PythonInterpreter(bContext* C) {
+ PythonInterpreter() {
_language = "Python";
- _context = C;
+ _context = 0;
//Py_Initialize();
}
@@ -61,6 +61,10 @@ class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter
//Py_Finalize();
}
+ void setContext(bContext *C) {
+ _context = C;
+ }
+
int interpretFile(const string& filename) {
initPath();