From 9cbbc9d3afd8742a36969736f648743d4f943393 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 2 Jun 2010 17:58:28 +0000 Subject: 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. --- source/blender/makesrna/intern/rna_ID.c | 4 ++-- source/blender/makesrna/intern/rna_image.c | 8 ++++---- source/blender/makesrna/intern/rna_main.c | 10 +++++----- source/blender/makesrna/intern/rna_main_api.c | 14 +++++++------- source/blender/makesrna/intern/rna_modifier.c | 12 ++++++------ source/blender/makesrna/intern/rna_sound.c | 8 ++++---- source/blender/makesrna/intern/rna_text.c | 4 ++-- source/blender/makesrna/intern/rna_vfont.c | 4 ++-- 8 files changed, 32 insertions(+), 32 deletions(-) (limited to 'source/blender/makesrna/intern') 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"); -- cgit v1.2.3