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>2010-07-26 05:23:27 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-07-26 05:23:27 +0400
commit25ce805a58fa833cf9c4e818f34d9664de1f3636 (patch)
treeddbb6464d836dd7437dd5b161cf3f8c6d8070eb9 /source/blender/freestyle/intern/system
parent2ef33845046b978b9a86c1ec90184af96d5bb943 (diff)
* Implemented the basic stroke rendering functionality for the new
Parameter Editor mode. This is a WIP commit. Only the base line color, base alpha transparency, and base line thickness are respected. More additions are anticipated to account for other parameters. * Added FRS_finish_stroke_rendering() to clean Freestyle-related temporary resources after stroke rendering. * Some functions in FRS_freestyle.cpp are now declared as static functions, so as not to mess up the program-wide name space. * Made the StyleModule class inheritable, and defined new subclass BlenderStyleModule that takes a Text object instead of a file name.
Diffstat (limited to 'source/blender/freestyle/intern/system')
-rwxr-xr-xsource/blender/freestyle/intern/system/PythonInterpreter.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h
index 1178e18cdea..ee2f2085d12 100755
--- a/source/blender/freestyle/intern/system/PythonInterpreter.h
+++ b/source/blender/freestyle/intern/system/PythonInterpreter.h
@@ -38,6 +38,7 @@
//soc
extern "C" {
#include "MEM_guardedalloc.h"
+#include "DNA_text_types.h"
#include "BKE_main.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -101,6 +102,27 @@ class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter
return 0;
}
+ int interpretText(struct Text *text, const string& name) {
+
+ initPath();
+
+ ReportList* reports = CTX_wm_reports(_context);
+
+ BKE_reports_clear(reports);
+
+ if (!BPY_run_python_script(_context, NULL, text, reports)) {
+ cout << "\nError executing Python script from PythonInterpreter::interpretText" << endl;
+ cout << "Name: " << name << endl;
+ cout << "Errors: " << endl;
+ BKE_reports_print(reports, RPT_ERROR);
+ return 1;
+ }
+
+ BKE_reports_clear(reports);
+
+ return 0;
+ }
+
struct Options
{
static void setPythonPath(const string& path) {