diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-02 21:58:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-02 21:58:28 +0400 |
commit | 9cbbc9d3afd8742a36969736f648743d4f943393 (patch) | |
tree | a1ef5a2d550493c0c6affd2a2accdc4a97307a66 /source | |
parent | fc59a6c6c8e847c6ad2c8132a5c10991f7f305b8 (diff) |
rename some rna properties filename --> filepath
* filename == "foo.ext"
* filepath == "/path/to/and/including/foo.ext"
this was alredy followed in some places not not everywhere.
Diffstat (limited to 'source')
22 files changed, 73 insertions, 73 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index e2909bf0904..dcc0a0b876f 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -2316,7 +2316,7 @@ int CustomData_verify_versions(struct CustomData *data, int index) static void customdata_external_filename(char filename[FILE_MAX], ID *id, CustomDataExternal *external) { - char *path = (id->lib)? id->lib->filename: G.sce; + char *path = (id->lib)? id->lib->filepath: G.sce; BLI_strncpy(filename, external->filename, FILE_MAX); BLI_path_abs(filename, path); diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 39efd9fe72e..f860f579930 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1562,7 +1562,7 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame) BLI_strncpy(name, ima->name, sizeof(name)); if(ima->id.lib) - BLI_path_abs(name, ima->id.lib->filename); + BLI_path_abs(name, ima->id.lib->filepath); else BLI_path_abs(name, G.sce); @@ -1669,7 +1669,7 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame) BLI_strncpy(str, ima->name, FILE_MAX); if(ima->id.lib) - BLI_path_abs(str, ima->id.lib->filename); + BLI_path_abs(str, ima->id.lib->filepath); else BLI_path_abs(str, G.sce); @@ -1727,7 +1727,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra) /* get the right string */ BLI_strncpy(str, ima->name, sizeof(str)); if(ima->id.lib) - BLI_path_abs(str, ima->id.lib->filename); + BLI_path_abs(str, ima->id.lib->filepath); else BLI_path_abs(str, G.sce); diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 1381a3b19dd..5931bf973af 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1225,7 +1225,7 @@ static void image_fix_relative_path(Image *ima) { if(ima->id.lib==NULL) return; if(strncmp(ima->name, "//", 2)==0) { - BLI_path_abs(ima->name, ima->id.lib->filename); + BLI_path_abs(ima->name, ima->id.lib->filepath); BLI_path_rel(ima->name, G.sce); } } diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index cb596622431..e14828d0f20 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1080,7 +1080,7 @@ static int ptcache_path(PTCacheID *pid, char *filename) char file[MAX_PTCACHE_PATH]; /* we dont want the dir, only the file */ char *blendfilename; - blendfilename= (lib && (pid->cache->flag & PTCACHE_IGNORE_LIBPATH)==0) ? lib->filename: G.sce; + blendfilename= (lib && (pid->cache->flag & PTCACHE_IGNORE_LIBPATH)==0) ? lib->filepath: G.sce; BLI_split_dirfile(blendfilename, NULL, file); i = strlen(file); diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 24e5014a741..6402f908422 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -256,7 +256,7 @@ void sound_load(struct Main *bmain, struct bSound* sound) BLI_strncpy(fullpath, sound->name, sizeof(fullpath)); if(sound->id.lib) - path = sound->id.lib->filename; + path = sound->id.lib->filepath; else path = bmain ? bmain->name : G.sce; diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index a2bdcfd0076..9b1d29e6e12 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -335,7 +335,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { /* get the path info from this datatype */ Image *ima = (Image *)bpi->data; - bpi->lib = ima->id.lib ? ima->id.lib->filename : NULL; + bpi->lib = ima->id.lib ? ima->id.lib->filepath : NULL; bpi->path = ima->name; bpi->name = ima->id.name+2; bpi->len = sizeof(ima->name); @@ -356,7 +356,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { /* get the path info from this datatype */ bSound *snd = (bSound *)bpi->data; - bpi->lib = snd->id.lib ? snd->id.lib->filename : NULL; + bpi->lib = snd->id.lib ? snd->id.lib->filepath : NULL; bpi->path = snd->name; bpi->name = snd->id.name+2; bpi->len = sizeof(snd->name); @@ -377,7 +377,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { /* get the path info from this datatype */ VFont *vf = (VFont *)bpi->data; - bpi->lib = vf->id.lib ? vf->id.lib->filename : NULL; + bpi->lib = vf->id.lib ? vf->id.lib->filepath : NULL; bpi->path = vf->name; bpi->name = vf->id.name+2; bpi->len = sizeof(vf->name); @@ -424,7 +424,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { if (bpi->data) { Mesh *me = (Mesh *)bpi->data; - bpi->lib = me->id.lib ? me->id.lib->filename : NULL; + bpi->lib = me->id.lib ? me->id.lib->filepath : NULL; bpi->path = me->fdata.external->filename; bpi->name = me->id.name+2; bpi->len = sizeof(me->fdata.external->filename); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b0256159e14..d4563df4d2c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -507,7 +507,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *name, c // printf("blo_find_main: converted to %s\n", name1); for (m= mainlist->first; m; m= m->next) { - char *libname= (m->curlib)?m->curlib->filename:m->name; + char *libname= (m->curlib)?m->curlib->filepath:m->name; if (BLI_streq(name1, libname)) { if(G.f & G_DEBUG) printf("blo_find_main: found library %s\n", libname); @@ -520,7 +520,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *name, c lib= alloc_libblock(&m->library, ID_LI, "lib"); strncpy(lib->name, name, sizeof(lib->name)-1); - BLI_strncpy(lib->filename, name1, sizeof(lib->filename)); + BLI_strncpy(lib->filepath, name1, sizeof(lib->filepath)); m->curlib= lib; @@ -5233,8 +5233,8 @@ static void direct_link_library(FileData *fd, Library *lib, Main *main) for(newmain= fd->mainlist.first; newmain; newmain= newmain->next) { if(newmain->curlib) { - if(strcmp(newmain->curlib->filename, lib->filename)==0) { - printf("Fixed error in file; multiple instances of lib:\n %s\n", lib->filename); + if(strcmp(newmain->curlib->filepath, lib->filepath)==0) { + printf("Fixed error in file; multiple instances of lib:\n %s\n", lib->filepath); change_idid_adr(&fd->mainlist, fd, lib, newmain->curlib); // change_idid_adr_fd(fd, lib, newmain->curlib); @@ -5249,8 +5249,8 @@ static void direct_link_library(FileData *fd, Library *lib, Main *main) } } /* make sure we have full path in lib->filename */ - BLI_strncpy(lib->filename, lib->name, sizeof(lib->name)); - cleanup_path(fd->relabase, lib->filename); + BLI_strncpy(lib->filepath, lib->name, sizeof(lib->name)); + cleanup_path(fd->relabase, lib->filepath); // printf("direct_link_library: name %s\n", lib->name); // printf("direct_link_library: filename %s\n", lib->filename); @@ -5283,7 +5283,7 @@ static void fix_relpaths_library(const char *basepath, Main *main) /* Libraries store both relative and abs paths, recreate relative paths, * relative to the blend file since indirectly linked libs will be relative to their direct linked library */ if (strncmp(lib->name, "//", 2)==0) { /* if this is relative to begin with? */ - strncpy(lib->name, lib->filename, sizeof(lib->name)); + strncpy(lib->name, lib->filepath, sizeof(lib->name)); BLI_path_rel(lib->name, basepath); } } @@ -12216,7 +12216,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in if(flag & FILE_RELPATH) { /* use the full path, this could have been read by other library even */ - BLI_strncpy(mainl->curlib->name, mainl->curlib->filename, sizeof(mainl->curlib->name)); + BLI_strncpy(mainl->curlib->name, mainl->curlib->filepath, sizeof(mainl->curlib->name)); /* uses current .blend file as reference */ BLI_path_rel(mainl->curlib->name, G.sce); @@ -12333,10 +12333,10 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) if(fd==NULL) { /* printf and reports for now... its important users know this */ - BKE_reportf(basefd->reports, RPT_INFO, "read library: '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name); - if(!G.background && basefd->reports) printf("read library: '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name); + BKE_reportf(basefd->reports, RPT_INFO, "read library: '%s', '%s'\n", mainptr->curlib->filepath, mainptr->curlib->name); + if(!G.background && basefd->reports) printf("read library: '%s', '%s'\n", mainptr->curlib->filepath, mainptr->curlib->name); - fd= blo_openblenderfile(mainptr->curlib->filename, basefd->reports); + fd= blo_openblenderfile(mainptr->curlib->filepath, basefd->reports); /* allow typing in a new lib path */ if(G.rt==-666) { @@ -12344,19 +12344,19 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) char newlib_path[240] = { 0 }; printf("Missing library...'\n"); printf(" current file: %s\n", G.sce); - printf(" absolute lib: %s\n", mainptr->curlib->filename); + printf(" absolute lib: %s\n", mainptr->curlib->filepath); printf(" relative lib: %s\n", mainptr->curlib->name); printf(" enter a new path:\n"); if(scanf("%s", newlib_path) > 0) { strcpy(mainptr->curlib->name, newlib_path); - strcpy(mainptr->curlib->filename, newlib_path); - cleanup_path(G.sce, mainptr->curlib->filename); + strcpy(mainptr->curlib->filepath, newlib_path); + cleanup_path(G.sce, mainptr->curlib->filepath); - fd= blo_openblenderfile(mainptr->curlib->filename, basefd->reports); + fd= blo_openblenderfile(mainptr->curlib->filepath, basefd->reports); if(fd) { - printf("found: '%s', party on macuno!\n", mainptr->curlib->filename); + printf("found: '%s', party on macuno!\n", mainptr->curlib->filepath); } } } @@ -12379,8 +12379,8 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) else mainptr->curlib->filedata= NULL; if (fd==NULL) { - BKE_reportf(basefd->reports, RPT_ERROR, "Can't find lib '%s'\n", mainptr->curlib->filename); - if(!G.background && basefd->reports) printf("ERROR: can't find lib %s \n", mainptr->curlib->filename); + BKE_reportf(basefd->reports, RPT_ERROR, "Can't find lib '%s'\n", mainptr->curlib->filepath); + if(!G.background && basefd->reports) printf("ERROR: can't find lib %s \n", mainptr->curlib->filepath); } } if(fd) { @@ -12397,8 +12397,8 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) append_id_part(fd, mainptr, id, &realid); if (!realid) { - BKE_reportf(fd->reports, RPT_ERROR, "LIB ERROR: %s:'%s' missing from '%s'\n", BLO_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filename); - if(!G.background && basefd->reports) printf("LIB ERROR: %s:'%s' missing from '%s'\n", BLO_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filename); + BKE_reportf(fd->reports, RPT_ERROR, "LIB ERROR: %s:'%s' missing from '%s'\n", BLO_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath); + if(!G.background && basefd->reports) printf("LIB ERROR: %s:'%s' missing from '%s'\n", BLO_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath); } change_idid_adr(mainlist, basefd, id, realid); @@ -12433,8 +12433,8 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) ID *idn= id->next; if(id->flag & LIB_READ) { BLI_remlink(lbarray[a], id); - BKE_reportf(basefd->reports, RPT_ERROR, "LIB ERROR: %s:'%s' unread libblock missing from '%s'\n", BLO_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filename); - if(!G.background && basefd->reports)printf("LIB ERROR: %s:'%s' unread libblock missing from '%s'\n", BLO_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filename); + BKE_reportf(basefd->reports, RPT_ERROR, "LIB ERROR: %s:'%s' unread libblock missing from '%s'\n", BLO_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath); + if(!G.background && basefd->reports)printf("LIB ERROR: %s:'%s' unread libblock missing from '%s'\n", BLO_idcode_to_name(GS(id->name)), id->name+2, mainptr->curlib->filepath); change_idid_adr(mainlist, basefd, id, NULL); MEM_freeN(id); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 2da638fca41..64f00caf479 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -5488,7 +5488,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) int h= settings->imapaint.screen_grab_size[1]; int maxsize; - RNA_string_get(op->ptr, "filename", filename); + RNA_string_get(op->ptr, "filepath", filename); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); @@ -5541,5 +5541,5 @@ void PAINT_OT_image_from_view(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER; - RNA_def_string_file_name(ot->srna, "filename", "", FILE_MAX, "File Name", "Name of the file"); + RNA_def_string_file_name(ot->srna, "filepath", "", FILE_MAX, "File Path", "Name of the file"); } diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 55b899bc1cd..b08ea810a33 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -841,7 +841,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propn if(ima->source != IMA_SRC_GENERATED) { row= uiLayoutRow(layout, 1); - uiItemR(row, &imaptr, "filename", 0, "", 0); + uiItemR(row, &imaptr, "filepath", 0, "", 0); uiItemO(row, "", ICON_FILE_REFRESH, "image.reload"); } diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 7e79b4b822e..629b1008aa0 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -891,7 +891,7 @@ static void node_composit_buts_file_output(uiLayout *layout, bContext *C, Pointe uiLayout *col, *row; col= uiLayoutColumn(layout, 0); - uiItemR(col, ptr, "filename", 0, "", 0); + uiItemR(col, ptr, "filepath", 0, "", 0); uiItemR(col, ptr, "image_type", 0, "", 0); row= uiLayoutRow(layout, 0); diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 55b8374656a..7c3641db379 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -117,7 +117,7 @@ typedef struct Library { ID *idblock; struct FileData *filedata; char name[240]; /* path name used for reading, can be relative and edited in the outliner */ - char filename[240]; /* temp. absolute filepath, only used while reading */ + char filepath[240]; /* temp. absolute filepath, only used while reading */ int tot, pad; /* tot, idblock and filedata are only fo read and write */ struct Library *parent; /* set for indirectly linked libs, used in the outliner and while reading */ } Library; diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 50ab36bd4a4..467eb237b9a 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -399,9 +399,9 @@ static void rna_def_library(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Library", "External .blend file from which data is linked"); RNA_def_struct_ui_icon(srna, ICON_LIBRARY_DATA_DIRECT); - prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); + prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "name"); - RNA_def_property_ui_text(prop, "Filename", "Path to the library .blend file"); + RNA_def_property_ui_text(prop, "File Path", "Path to the library .blend file"); /* TODO - lib->filename isnt updated, however the outliner also skips this, probably only needed on read. */ prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index c4137d5379b..c9b25bf47a6 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -296,15 +296,15 @@ static void rna_def_image(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Image", "Image datablock referencing an external or packed image"); RNA_def_struct_ui_icon(srna, ICON_IMAGE_DATA); - prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); + prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "name"); - RNA_def_property_ui_text(prop, "Filename", "Image/Movie file name"); + RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name"); RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_reload_update"); /* eek. this is horrible but needed so we can save to a new name without blanking the data :( */ - prop= RNA_def_property(srna, "filename_raw", PROP_STRING, PROP_FILEPATH); + prop= RNA_def_property(srna, "filepath_raw", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "name"); - RNA_def_property_ui_text(prop, "Filename", "Image/Movie file name (without data refreshing)"); + RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name (without data refreshing)"); prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, image_type_items); diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index b683f5dc4b1..052c9fb3453 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -55,20 +55,20 @@ static int rna_Main_fileissaved_get(PointerRNA *ptr) return G.relbase_valid; } -static void rna_Main_filename_get(PointerRNA *ptr, char *value) +static void rna_Main_filepath_get(PointerRNA *ptr, char *value) { Main *bmain= (Main*)ptr->data; BLI_strncpy(value, bmain->name, sizeof(bmain->name)); } -static int rna_Main_filename_length(PointerRNA *ptr) +static int rna_Main_filepath_length(PointerRNA *ptr) { Main *bmain= (Main*)ptr->data; return strlen(bmain->name); } #if 0 -static void rna_Main_filename_set(PointerRNA *ptr, const char *value) +static void rna_Main_filepath_set(PointerRNA *ptr, const char *value) { Main *bmain= (Main*)ptr->data; BLI_strncpy(bmain->name, value, sizeof(bmain->name)); @@ -308,9 +308,9 @@ void RNA_def_main(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Main", "Main data structure representing a .blend file and all its datablocks"); RNA_def_struct_ui_icon(srna, ICON_BLENDER); - prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); + prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_maxlength(prop, 240); - RNA_def_property_string_funcs(prop, "rna_Main_filename_get", "rna_Main_filename_length", "rna_Main_filename_set"); + RNA_def_property_string_funcs(prop, "rna_Main_filepath_get", "rna_Main_filepath_length", "rna_Main_filepath_set"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file"); diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 34eef0bb459..c9e17a562af 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -260,9 +260,9 @@ Image *rna_Main_images_new(Main *bmain, char* name, int width, int height, int f image->id.us--; return image; } -Image *rna_Main_images_load(Main *bmain, char *filename) +Image *rna_Main_images_load(Main *bmain, char *filepath) { - return BKE_add_image_file(filename, 0); + return BKE_add_image_file(filepath, 0); } void rna_Main_images_remove(Main *bmain, ReportList *reports, Image *image) { @@ -316,9 +316,9 @@ void rna_Main_metaballs_remove(Main *bmain, ReportList *reports, struct MetaBall BKE_reportf(reports, RPT_ERROR, "MetaBall \"%s\" must have zero users to be removed, found %d.", mb->id.name+2, ID_REAL_USERS(mb)); } -VFont *rna_Main_fonts_load(Main *bmain, char *filename) +VFont *rna_Main_fonts_load(Main *bmain, char *filepath) { - return load_vfont(filename); + return load_vfont(filepath); } void rna_Main_fonts_remove(Main *bmain, ReportList *reports, VFont *vfont) { @@ -465,7 +465,7 @@ void RNA_api_main(StructRNA *srna) /* func= RNA_def_function(srna, "add_image", "rna_Main_add_image"); RNA_def_function_ui_description(func, "Add a new image."); - parm= RNA_def_string(func, "filename", "", 0, "", "Filename to load image from."); + parm= RNA_def_string(func, "filepath", "", 0, "", "File path to load image from."); RNA_def_property_flag(parm, PROP_REQUIRED); parm= RNA_def_pointer(func, "image", "Image", "", "New image."); RNA_def_function_return(func, parm); @@ -692,7 +692,7 @@ void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "load", "rna_Main_images_load"); RNA_def_function_ui_description(func, "Load a new image into the main database"); - parm= RNA_def_string(func, "filename", "File Name", 0, "", "path of the file to load."); + parm= RNA_def_string(func, "filepath", "File Path", 0, "", "path of the file to load."); RNA_def_property_flag(parm, PROP_REQUIRED); /* return type */ parm= RNA_def_pointer(func, "image", "Image", "", "New image datablock."); @@ -791,7 +791,7 @@ void RNA_def_main_fonts(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "load", "rna_Main_fonts_load"); RNA_def_function_ui_description(func, "Load a new font into the main database"); - parm= RNA_def_string(func, "filename", "File Name", 0, "", "path of the font to load."); + parm= RNA_def_string(func, "filepath", "File Path", 0, "", "path of the font to load."); RNA_def_property_flag(parm, PROP_REQUIRED); /* return type */ parm= RNA_def_pointer(func, "vfont", "VectorFont", "", "New font datablock."); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 5d3d6a8e3c3..0ee2360a787 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -370,7 +370,7 @@ static int rna_MultiresModifier_external_get(PointerRNA *ptr) return CustomData_external_test(&me->fdata, CD_MDISPS); } -static void rna_MultiresModifier_filename_get(PointerRNA *ptr, char *value) +static void rna_MultiresModifier_filepath_get(PointerRNA *ptr, char *value) { Object *ob= (Object*)ptr->id.data; CustomDataExternal *external= ((Mesh*)ob->data)->fdata.external; @@ -378,7 +378,7 @@ static void rna_MultiresModifier_filename_get(PointerRNA *ptr, char *value) BLI_strncpy(value, (external)? external->filename: "", sizeof(external->filename)); } -static void rna_MultiresModifier_filename_set(PointerRNA *ptr, const char *value) +static void rna_MultiresModifier_filepath_set(PointerRNA *ptr, const char *value) { Object *ob= (Object*)ptr->id.data; CustomDataExternal *external= ((Mesh*)ob->data)->fdata.external; @@ -389,7 +389,7 @@ static void rna_MultiresModifier_filename_set(PointerRNA *ptr, const char *value } } -static int rna_MultiresModifier_filename_length(PointerRNA *ptr) +static int rna_MultiresModifier_filepath_length(PointerRNA *ptr) { Object *ob= (Object*)ptr->id.data; CustomDataExternal *external= ((Mesh*)ob->data)->fdata.external; @@ -606,9 +606,9 @@ static void rna_def_modifier_multires(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_MultiresModifier_external_get", NULL); RNA_def_property_ui_text(prop, "External", "Store multires displacements outside the .blend file, to save memory"); - prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); - RNA_def_property_string_funcs(prop, "rna_MultiresModifier_filename_get", "rna_MultiresModifier_filename_length", "rna_MultiresModifier_filename_set"); - RNA_def_property_ui_text(prop, "Filename", "Path to external displacements file"); + prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); + RNA_def_property_string_funcs(prop, "rna_MultiresModifier_filepath_get", "rna_MultiresModifier_filepath_length", "rna_MultiresModifier_filepath_set"); + RNA_def_property_ui_text(prop, "File Path", "Path to external displacements file"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop= RNA_def_property(srna, "optimal_display", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c index 3ff81df02f8..b3c9e36e7b9 100644 --- a/source/blender/makesrna/intern/rna_sound.c +++ b/source/blender/makesrna/intern/rna_sound.c @@ -36,7 +36,7 @@ #include "BKE_sound.h" #include "BKE_context.h" -static void rna_Sound_filename_update(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_Sound_filepath_update(Main *bmain, Scene *scene, PointerRNA *ptr) { sound_load(bmain, (bSound*)ptr->data); } @@ -70,10 +70,10 @@ static void rna_def_sound(BlenderRNA *brna) //rna_def_ipo_common(srna); - prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); + prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_ui_text(prop, "Filename", "Sound sample file used by this Sound datablock"); - RNA_def_property_update(prop, 0, "rna_Sound_filename_update"); + RNA_def_property_update(prop, 0, "rna_Sound_filepath_update"); prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "packedfile"); @@ -82,7 +82,7 @@ static void rna_def_sound(BlenderRNA *brna) prop= RNA_def_property(srna, "caching", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_Sound_caching_get", "rna_Sound_caching_set"); RNA_def_property_ui_text(prop, "Caching", "The sound file is decoded and loaded into RAM"); - RNA_def_property_update(prop, 0, "rna_Sound_filename_update"); + RNA_def_property_update(prop, 0, "rna_Sound_filepath_update"); } void RNA_def_sound(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c index ad90afb84a6..ccd3b432163 100644 --- a/source/blender/makesrna/intern/rna_text.c +++ b/source/blender/makesrna/intern/rna_text.c @@ -174,9 +174,9 @@ static void rna_def_text(BlenderRNA *brna) RNA_def_struct_ui_icon(srna, ICON_TEXT); RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT); - prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_Text_filename_get", "rna_Text_filename_length", "rna_Text_filename_set"); - RNA_def_property_ui_text(prop, "Filename", "Filename of the text file"); + RNA_def_property_ui_text(prop, "File Path", "Filename of the text file"); prop= RNA_def_property(srna, "dirty", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISDIRTY); diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c index 1f8be906eb3..c19fbd7d5d3 100644 --- a/source/blender/makesrna/intern/rna_vfont.c +++ b/source/blender/makesrna/intern/rna_vfont.c @@ -44,10 +44,10 @@ void RNA_def_vfont(BlenderRNA *brna) RNA_def_struct_sdna(srna, "VFont"); RNA_def_struct_ui_icon(srna, ICON_FILE_FONT); - prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); + prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_sdna(prop, NULL, "name"); - RNA_def_property_ui_text(prop, "Filename", ""); + RNA_def_property_ui_text(prop, "File Path", ""); prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "packedfile"); diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c index 2f2415ee7aa..6ac63499988 100644 --- a/source/blender/python/generic/bpy_internal_import.c +++ b/source/blender/python/generic/bpy_internal_import.c @@ -59,7 +59,7 @@ void bpy_import_main_set(struct Main *maggie) /* returns a dummy filename for a textblock so we can tell what file a text block comes from */ void bpy_text_filename_get(char *fn, Text *text) { - sprintf(fn, "%s/%s", text->id.lib ? text->id.lib->filename : G.sce, text->id.name+2); + sprintf(fn, "%s/%s", text->id.lib ? text->id.lib->filepath : G.sce, text->id.name+2); } PyObject *bpy_text_import( Text *text ) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index d4094c57a84..842e43b98cf 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1518,7 +1518,7 @@ static void wm_link_make_library_local(Main *main, const char *libname) /* and now find the latest append lib file */ for(lib= main->library.first; lib; lib=lib->id.next) - if(BLI_streq(libname, lib->filename)) + if(BLI_streq(libname, lib->filepath)) break; /* make local */ diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 40636fe6d03..b3a35db9a64 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -1830,7 +1830,7 @@ static void initPySysObjects(Main *maggie) while(lib) { /* lib->name wont work in some cases (on win32), * even when expanding with gp_GamePythonPath, using lib->filename is less trouble */ - initPySysObjects__append(sys_path, lib->filename); + initPySysObjects__append(sys_path, lib->filepath); lib= (Library *)lib->id.next; } |