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 <campbell@blender.org>2022-03-24 08:33:32 +0300
committerCampbell Barton <campbell@blender.org>2022-03-24 08:54:01 +0300
commit4682a0882f02c50b20aa3c4bf9abe9f7ec2e834b (patch)
tree36dc6fb09eaa1d539e516875ed957aba5334666e /source/blender/editors/curve
parent5058c4b1446f58bb9a5ddcb65f7353d9df3a594a (diff)
Cleanup: use "filepath" instead of "filename" for full paths
Reserve "filename" when only the name component is used.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editfont.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 0afb1c2f4af..611dbb2e80c 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -526,16 +526,16 @@ static bool font_paste_utf8(bContext *C, const char *str, const size_t str_len)
/** \name Paste From File Operator
* \{ */
-static int paste_from_file(bContext *C, ReportList *reports, const char *filename)
+static int paste_from_file(bContext *C, ReportList *reports, const char *filepath)
{
Object *obedit = CTX_data_edit_object(C);
char *strp;
size_t filelen;
int retval;
- strp = BLI_file_read_text_as_mem(filename, 1, &filelen);
+ strp = BLI_file_read_text_as_mem(filepath, 1, &filelen);
if (strp == NULL) {
- BKE_reportf(reports, RPT_ERROR, "Failed to open file '%s'", filename);
+ BKE_reportf(reports, RPT_ERROR, "Failed to open file '%s'", filepath);
return OPERATOR_CANCELLED;
}
strp[filelen] = 0;
@@ -545,7 +545,7 @@ static int paste_from_file(bContext *C, ReportList *reports, const char *filenam
retval = OPERATOR_FINISHED;
}
else {
- BKE_reportf(reports, RPT_ERROR, "File too long %s", filename);
+ BKE_reportf(reports, RPT_ERROR, "File too long %s", filepath);
retval = OPERATOR_CANCELLED;
}
@@ -556,12 +556,12 @@ static int paste_from_file(bContext *C, ReportList *reports, const char *filenam
static int paste_from_file_exec(bContext *C, wmOperator *op)
{
- char *path;
+ char *filepath;
int retval;
- path = RNA_string_get_alloc(op->ptr, "filepath", NULL, 0, NULL);
- retval = paste_from_file(C, op->reports, path);
- MEM_freeN(path);
+ filepath = RNA_string_get_alloc(op->ptr, "filepath", NULL, 0, NULL);
+ retval = paste_from_file(C, op->reports, filepath);
+ MEM_freeN(filepath);
return retval;
}
@@ -2091,7 +2091,7 @@ static int font_open_exec(bContext *C, wmOperator *op)
static int open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
VFont *vfont = NULL;
- const char *path;
+ const char *filepath;
PointerRNA idptr;
PropertyPointerRNA *pprop;
@@ -2106,13 +2106,13 @@ static int open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)
vfont = (VFont *)idptr.owner_id;
}
- path = (vfont && !BKE_vfont_is_builtin(vfont)) ? vfont->filepath : U.fontdir;
+ filepath = (vfont && !BKE_vfont_is_builtin(vfont)) ? vfont->filepath : U.fontdir;
if (RNA_struct_property_is_set(op->ptr, "filepath")) {
return font_open_exec(C, op);
}
- RNA_string_set(op->ptr, "filepath", path);
+ RNA_string_set(op->ptr, "filepath", filepath);
WM_event_add_fileselect(C, op);
return OPERATOR_RUNNING_MODAL;