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:
authorAndrea Weikert <elubie@gmx.net>2009-09-12 23:54:39 +0400
committerAndrea Weikert <elubie@gmx.net>2009-09-12 23:54:39 +0400
commit9a25d22326060395b09cd6d81d7b4ac080bafb8f (patch)
treeeb9ef68ff4b155f69d3d8beedc221b72d92ea83c /source/blender/editors/space_script
parentc1e2e3fea2dd1b22cf22a9dca4d88bde2d280ab6 (diff)
2.5 filebrowser
Appending and Linking * Linking Operator, invokes filebrowser for Append/Link * Separated the append/link function into three parts: ** BLO_library_append_begin finds main for appending ** BLO_library_append_named_part appends one Object,Group, Material, ... ** BLO_library_append_end actually reads and expands the libraries NOTE 1: I also changed the returned properties for the filebrowser operators to the following convention: "path" - the full path to a file or directory, means what is in directory + filename buttons in filebrowser "directory" - the content of the directory button in filebrowser "filename" - the content of the filename button in filebrowser Usually only path should be required, but in some cases it might be more convenient to retrieve the parts separately. Ton, Brecht: If you have time to take a look, let me know if anything needs to be fixed.
Diffstat (limited to 'source/blender/editors/space_script')
-rw-r--r--source/blender/editors/space_script/script_edit.c8
-rw-r--r--source/blender/editors/space_script/script_ops.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 88b8dccc6c9..c17793b28f8 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -64,10 +64,10 @@ static int run_pyfile_exec(bContext *C, wmOperator *op)
ARegion *ar= CTX_wm_region(C);
- char filename[512];
- RNA_string_get(op->ptr, "filename", filename);
+ char path[512];
+ RNA_string_get(op->ptr, "path", path);
#ifndef DISABLE_PYTHON
- if(BPY_run_python_script(C, filename, NULL, op->reports)) {
+ if(BPY_run_python_script(C, path, NULL, op->reports)) {
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
}
@@ -85,7 +85,7 @@ void SCRIPT_OT_python_file_run(wmOperatorType *ot)
ot->exec= run_pyfile_exec;
ot->poll= ED_operator_areaactive;
- RNA_def_string_file_path(ot->srna, "filename", "", 512, "Filename", "");
+ RNA_def_string_file_path(ot->srna, "path", "", 512, "Path", "");
}
static int run_ui_scripts_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/space_script/script_ops.c b/source/blender/editors/space_script/script_ops.c
index aa35ba54b7f..270cc1ffd8f 100644
--- a/source/blender/editors/space_script/script_ops.c
+++ b/source/blender/editors/space_script/script_ops.c
@@ -68,7 +68,7 @@ void script_keymap(wmWindowManager *wm)
ListBase *keymap= WM_keymap_listbase(wm, "Script", SPACE_SCRIPT, 0);
/* TODO - this is just while we have no way to load a text datablock */
- RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "filename", "test.py");
+ RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_python_file_run", PKEY, KM_PRESS, KM_CTRL|KM_SHIFT|KM_ALT, 0)->ptr, "path", "test.py");
WM_keymap_add_item(keymap, "SCRIPT_OT_python_run_ui_scripts", PKEY, KM_PRESS, KM_SHIFT, 0);
}