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-10-27 02:17:48 +0300
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-10-27 02:17:48 +0300
commitd56a0fd72d58bc2504bfe43cbe3db8c3d4c226f4 (patch)
treee823d468ad316f1bd5365653a9c4816c1dd8f5f8 /source/blender/freestyle
parenta9a4dee0d04e30d2e5706dbccd32b567ae4a0d0f (diff)
Fixed PythonInterpreter::interpretFile() so as to just use add_text()
instead of add_empty_text() plus file I/O code of its own.
Diffstat (limited to 'source/blender/freestyle')
-rwxr-xr-xsource/blender/freestyle/intern/system/PythonInterpreter.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h
index 314b91228ce..e04e1d9b9d1 100755
--- a/source/blender/freestyle/intern/system/PythonInterpreter.h
+++ b/source/blender/freestyle/intern/system/PythonInterpreter.h
@@ -72,16 +72,9 @@ class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter
int status = BPY_run_python_script(_context, fn, NULL, reports);
#else
int status;
- FILE *fp = fopen(fn, "r");
- if (fp) {
- struct Text *text = add_empty_text("tmp_freestyle.txt");
- char buf[256];
- while (fgets(buf, sizeof(buf), fp) != NULL)
- txt_insert_buf(text, buf);
- fclose(fp);
-
+ Text *text = add_text(fn, G.sce);
+ if (text) {
status = BPY_run_python_script(_context, NULL, text, reports);
-
unlink_text(G.main, text);
free_libblock(&G.main->text, text);
} else {