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:
authorCampbell Barton <ideasman42@gmail.com>2011-01-05 05:08:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-05 05:08:54 +0300
commit96b646c68dd9f62f7655b7eee902bddb908e12a5 (patch)
tree9ccc70ed2f3cdb9aeb60f5dbacc4d798ffa8223f /source/blender/editors
parent8200e44c392f999efa6660f9f81af25792752bd4 (diff)
edits for BPY_extern.h functions, no functional changes
- remove unused code. - BPY_run_python_script() split in 2, BPY_filepath_exec, BPY_text_exec - renamed funcs.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface.c2
-rw-r--r--source/blender/editors/space_script/script_edit.c6
-rw-r--r--source/blender/editors/space_script/space_script.c5
-rw-r--r--source/blender/editors/space_text/text_ops.c4
4 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 4e3e9786a5a..5860bdaed2f 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1734,7 +1734,7 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str)
bUnit_ReplaceString(str_unit_convert, sizeof(str_unit_convert), but->drawstr, ui_get_but_scale_unit(but, 1.0), scene->unit.system, unit_type>>16);
}
- if(BPY_eval_button(C, str_unit_convert, &value)) {
+ if(BPY_button_exec(C, str_unit_convert, &value)) {
value = ui_get_but_val(but); /* use its original value */
if(str[0])
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 4e65c216cd3..ba51fd93f92 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -47,7 +47,7 @@
#include "script_intern.h" // own include
#ifdef WITH_PYTHON
-#include "BPY_extern.h" /* BPY_run_python_script */
+#include "BPY_extern.h" /* BPY_script_exec */
#endif
static int run_pyfile_exec(bContext *C, wmOperator *op)
@@ -55,7 +55,7 @@ static int run_pyfile_exec(bContext *C, wmOperator *op)
char path[512];
RNA_string_get(op->ptr, "filepath", path);
#ifdef WITH_PYTHON
- if(BPY_run_python_script(C, path, NULL, op->reports)) {
+ if(BPY_filepath_exec(C, path, op->reports)) {
ARegion *ar= CTX_wm_region(C);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
@@ -88,7 +88,7 @@ static int script_reload_exec(bContext *C, wmOperator *UNUSED(op))
/* TODO, this crashes on netrender and keying sets, need to look into why
* disable for now unless running in debug mode */
WM_cursor_wait(1);
- BPY_eval_string(C, "__import__('bpy').utils.load_scripts(reload_scripts=True)");
+ BPY_string_exec(C, "__import__('bpy').utils.load_scripts(reload_scripts=True)");
WM_cursor_wait(0);
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index 57d7bba8e3b..106c79f8fd0 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -148,12 +148,11 @@ static void script_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_view_ortho(v2d);
/* data... */
- // BPY_run_python_script(C, "/root/blender-svn/blender25/test.py", NULL);
+ // BPY_script_exec(C, "/root/blender-svn/blender25/test.py", NULL);
#ifdef WITH_PYTHON
if (sscript->script) {
- //BPY_run_python_script_space(scpt->script.filename, NULL);
- BPY_run_script_space_draw(C, sscript);
+ // BPY_run_script_space_draw(C, sscript);
}
#else
(void)sscript;
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 8dc67ca4774..e3ac59861bf 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -314,7 +314,7 @@ static int reload_exec(bContext *C, wmOperator *op)
#ifdef WITH_PYTHON
if(text->compiled)
- BPY_free_compiled_text(text);
+ BPY_text_free_code(text);
#endif
text_update_edited(text);
@@ -569,7 +569,7 @@ static int run_script_exec(bContext *C, wmOperator *op)
Text *text= CTX_data_edit_text(C);
SpaceText *st= CTX_wm_space_text(C);
- if (BPY_run_python_script(C, NULL, text, op->reports))
+ if (BPY_text_exec(C, text, op->reports))
return OPERATOR_FINISHED;
/* Dont report error messages while live editing */