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>2010-06-14 07:52:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-06-14 07:52:10 +0400
commitc2f36a4d6abf829f28079c80e7e9dae6b80251cc (patch)
tree0c85ad35fca0cadbb997a098244debab62a6167a /source/blender/windowmanager
parentaa97b4362be6015b3e7e1d5c72bd5245cfb0960a (diff)
naming changes
path -> filepath (for rna and operators, as agreed on with elubie) path -> data_path (for windowmanager context functions, this was alredy used in many places)
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_api.h2
-rw-r--r--source/blender/windowmanager/WM_types.h2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c2
-rw-r--r--source/blender/windowmanager/intern/wm_files.c22
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c60
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
7 files changed, 46 insertions, 46 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 6668cbf5dd8..dbbe1312f0a 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -184,7 +184,7 @@ int WM_menu_invoke (struct bContext *C, struct wmOperator *op, struct wmEven
int WM_enum_search_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event);
/* invoke callback, confirm menu + exec */
int WM_operator_confirm (struct bContext *C, struct wmOperator *op, struct wmEvent *event);
- /* invoke callback, file selector "path" unset + exec */
+ /* invoke callback, file selector "filepath" unset + exec */
int WM_operator_filesel (struct bContext *C, struct wmOperator *op, struct wmEvent *event);
/* poll callback, context checks */
int WM_operator_winactive (struct bContext *C);
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 2769f550f9a..3b83e4b760b 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -498,7 +498,7 @@ typedef struct wmDropBox {
typedef struct RecentFile {
struct RecentFile *next, *prev;
- char *filename;
+ char *filepath;
} RecentFile;
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index dc81dc39488..15852941ca6 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1212,7 +1212,7 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
{
/* XXX validate area and region? */
bScreen *screen= CTX_wm_screen(C);
- char *path= RNA_string_get_alloc(handler->op->ptr, "path", NULL, 0);
+ char *path= RNA_string_get_alloc(handler->op->ptr, "filepath", NULL, 0);
if(screen != handler->filescreen)
ED_screen_full_prevspace(C, CTX_wm_area(C));
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 44768116c7c..17a04cab7be 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -407,10 +407,10 @@ void read_Blog(void)
recent = (RecentFile*)MEM_mallocN(sizeof(RecentFile),"RecentFile");
BLI_addtail(&(G.recent_files), recent);
- recent->filename = (char*)MEM_mallocN(sizeof(char)*(strlen(line)+1), "name of file");
- recent->filename[0] = '\0';
+ recent->filepath = (char*)MEM_mallocN(sizeof(char)*(strlen(line)+1), "name of file");
+ recent->filepath[0] = '\0';
- strcpy(recent->filename, line);
+ strcpy(recent->filepath, line);
num++;
}
}
@@ -433,29 +433,29 @@ static void writeBlog(void)
recent = G.recent_files.first;
/* refresh .Blog of recent opened files, when current file was changed */
- if(!(recent) || (strcmp(recent->filename, G.sce)!=0)) {
+ if(!(recent) || (strcmp(recent->filepath, G.sce)!=0)) {
fp= fopen(name, "w");
if (fp) {
/* add current file to the beginning of list */
recent = (RecentFile*)MEM_mallocN(sizeof(RecentFile),"RecentFile");
- recent->filename = (char*)MEM_mallocN(sizeof(char)*(strlen(G.sce)+1), "name of file");
- recent->filename[0] = '\0';
- strcpy(recent->filename, G.sce);
+ recent->filepath = (char*)MEM_mallocN(sizeof(char)*(strlen(G.sce)+1), "name of file");
+ recent->filepath[0] = '\0';
+ strcpy(recent->filepath, G.sce);
BLI_addhead(&(G.recent_files), recent);
/* write current file to .Blog */
- fprintf(fp, "%s\n", recent->filename);
+ fprintf(fp, "%s\n", recent->filepath);
recent = recent->next;
i=1;
/* write rest of recent opened files to .Blog */
while((i<U.recent_files) && (recent)){
/* this prevents to have duplicities in list */
- if (strcmp(recent->filename, G.sce)!=0) {
- fprintf(fp, "%s\n", recent->filename);
+ if (strcmp(recent->filepath, G.sce)!=0) {
+ fprintf(fp, "%s\n", recent->filepath);
recent = recent->next;
}
else {
next_recent = recent->next;
- MEM_freeN(recent->filename);
+ MEM_freeN(recent->filepath);
BLI_freelinkN(&(G.recent_files), recent);
recent = next_recent;
}
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index ed2ba460e9d..02e645ef635 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -202,7 +202,7 @@ static void free_openrecent(void)
struct RecentFile *recent;
for(recent = G.recent_files.first; recent; recent=recent->next)
- MEM_freeN(recent->filename);
+ MEM_freeN(recent->filepath);
BLI_freelistN(&(G.recent_files));
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index c43f362ceaa..355be67f2cd 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -774,7 +774,7 @@ int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *event)
/* op->invoke, opens fileselect if path property not set, otherwise executes */
int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event)
{
- if (RNA_property_is_set(op->ptr, "path")) {
+ if (RNA_property_is_set(op->ptr, "filepath")) {
return WM_operator_call(C, op);
}
else {
@@ -788,7 +788,7 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
{
PropertyRNA *prop;
- RNA_def_string_file_path(ot->srna, "path", "", FILE_MAX, "File Path", "Path to file");
+ RNA_def_string_file_path(ot->srna, "filepath", "", FILE_MAX, "File Path", "Path to file");
RNA_def_string_file_name(ot->srna, "filename", "", FILE_MAX, "File Name", "Name of the file");
RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Directory of the file");
@@ -1215,7 +1215,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse
col = uiLayoutColumn(split, 0);
uiItemL(col, "Recent", 0);
for(recent = G.recent_files.first, i=0; (i<5) && (recent); recent = recent->next, i++) {
- uiItemStringO(col, BLI_path_basename(recent->filename), ICON_FILE_BLEND, "WM_OT_open_mainfile", "path", recent->filename);
+ uiItemStringO(col, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath);
}
uiItemS(col);
uiItemO(col, NULL, ICON_RECOVER_LAST, "WM_OT_recover_last_session");
@@ -1429,7 +1429,7 @@ static void open_set_use_scripts(wmOperator *op)
static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- RNA_string_set(op->ptr, "path", G.sce);
+ RNA_string_set(op->ptr, "filepath", G.sce);
open_set_load_ui(op);
open_set_use_scripts(op);
@@ -1442,7 +1442,7 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op)
{
char path[FILE_MAX];
- RNA_string_get(op->ptr, "path", path);
+ RNA_string_get(op->ptr, "filepath", path);
open_set_load_ui(op);
open_set_use_scripts(op);
@@ -1488,12 +1488,12 @@ static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *event)
if(!RNA_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
- if(RNA_property_is_set(op->ptr, "path")) {
+ if(RNA_property_is_set(op->ptr, "filepath")) {
return WM_operator_call(C, op);
}
else {
/* XXX TODO solve where to get last linked library from */
- RNA_string_set(op->ptr, "path", G.lib);
+ RNA_string_set(op->ptr, "filepath", G.lib);
WM_event_add_fileselect(C, op);
return OPERATOR_RUNNING_MODAL;
}
@@ -1693,7 +1693,7 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op)
{
char path[FILE_MAX];
- RNA_string_get(op->ptr, "path", path);
+ RNA_string_get(op->ptr, "filepath", path);
G.fileflags |= G_FILE_RECOVER;
@@ -1714,7 +1714,7 @@ static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *eve
char filename[FILE_MAX];
wm_autosave_location(filename);
- RNA_string_set(op->ptr, "path", filename);
+ RNA_string_set(op->ptr, "filepath", filename);
WM_event_add_fileselect(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -1765,7 +1765,7 @@ static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *even
BLI_strncpy(name, G.sce, FILE_MAX);
untitled(name);
- RNA_string_set(op->ptr, "path", name);
+ RNA_string_set(op->ptr, "filepath", name);
WM_event_add_fileselect(C, op);
@@ -1780,8 +1780,8 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
save_set_compress(op);
- if(RNA_property_is_set(op->ptr, "path"))
- RNA_string_get(op->ptr, "path", path);
+ if(RNA_property_is_set(op->ptr, "filepath"))
+ RNA_string_get(op->ptr, "filepath", path);
else {
BLI_strncpy(path, G.sce, FILE_MAX);
untitled(path);
@@ -1833,7 +1833,7 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event)
BLI_strncpy(name, G.sce, FILE_MAX);
untitled(name);
- RNA_string_set(op->ptr, "path", name);
+ RNA_string_set(op->ptr, "filepath", name);
if (RNA_struct_find_property(op->ptr, "check_existing"))
if (RNA_boolean_get(op->ptr, "check_existing")==0)
@@ -1875,9 +1875,9 @@ static void WM_OT_save_mainfile(wmOperatorType *ot)
static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!RNA_property_is_set(op->ptr, "path")) {
+ if(!RNA_property_is_set(op->ptr, "filepath")) {
char *path = BLI_replacestr(G.sce, ".blend", ".dae");
- RNA_string_set(op->ptr, "path", path);
+ RNA_string_set(op->ptr, "filepath", path);
MEM_freeN(path);
}
@@ -1891,12 +1891,12 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
{
char filename[FILE_MAX];
- if(!RNA_property_is_set(op->ptr, "path")) {
+ if(!RNA_property_is_set(op->ptr, "filepath")) {
BKE_report(op->reports, RPT_ERROR, "No filename given");
return OPERATOR_CANCELLED;
}
- RNA_string_get(op->ptr, "path", filename);
+ RNA_string_get(op->ptr, "filepath", filename);
collada_export(CTX_data_scene(C), filename);
return OPERATOR_FINISHED;
@@ -1919,12 +1919,12 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op)
{
char filename[FILE_MAX];
- if(!RNA_property_is_set(op->ptr, "path")) {
+ if(!RNA_property_is_set(op->ptr, "filepath")) {
BKE_report(op->reports, RPT_ERROR, "No filename given");
return OPERATOR_CANCELLED;
}
- RNA_string_get(op->ptr, "path", filename);
+ RNA_string_get(op->ptr, "filepath", filename);
collada_import(C, filename);
return OPERATOR_FINISHED;
@@ -3201,47 +3201,47 @@ void wm_window_keymap(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F2KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was DXF export */
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "LOGIC_EDITOR");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F3KEY, KM_PRESS, KM_SHIFT, 0);
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "NODE_EDITOR");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F4KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was data browser */
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "CONSOLE");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F5KEY, KM_PRESS, KM_SHIFT, 0);
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "VIEW_3D");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F6KEY, KM_PRESS, KM_SHIFT, 0);
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "GRAPH_EDITOR");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F7KEY, KM_PRESS, KM_SHIFT, 0);
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "PROPERTIES");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F8KEY, KM_PRESS, KM_SHIFT, 0);
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "SEQUENCE_EDITOR");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F9KEY, KM_PRESS, KM_SHIFT, 0);
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "OUTLINER");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F10KEY, KM_PRESS, KM_SHIFT, 0);
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "IMAGE_EDITOR");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F11KEY, KM_PRESS, KM_SHIFT, 0);
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "TEXT_EDITOR");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F12KEY, KM_PRESS, KM_SHIFT, 0);
- RNA_string_set(kmi->ptr, "path", "area.type");
+ RNA_string_set(kmi->ptr, "data_path", "area.type");
RNA_string_set(kmi->ptr, "value", "DOPESHEET_EDITOR");
gesture_circle_modal_keymap(keyconf);
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index b730d1a6483..6d01620dae8 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -729,7 +729,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private)
CTX_wm_window_set(C, win);
WM_operator_properties_create(&props_ptr, "WM_OT_open_mainfile");
- RNA_string_set(&props_ptr, "path", path);
+ RNA_string_set(&props_ptr, "filepath", path);
WM_operator_name_call(C, "WM_OT_open_mainfile", WM_OP_EXEC_DEFAULT, &props_ptr);
WM_operator_properties_free(&props_ptr);