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>2020-06-23 02:54:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-06-23 04:29:36 +0300
commit716a8241d387180fd8ad69cdec33633bc7a0f963 (patch)
treed4674969beacfa6f9d50726f5943e050a373f2b5 /source/blender/makesrna/intern/rna_text.c
parenta573d7e8a14ce5e49b8c05ff762a00e181e905aa (diff)
Cleanup: rename 'name' to 'filepath' for DNA types
Using 'name' for the full path of a file reads badly, especially when id.name is used in related code.
Diffstat (limited to 'source/blender/makesrna/intern/rna_text.c')
-rw-r--r--source/blender/makesrna/intern/rna_text.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index c8797a8bc74..1351c027004 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -43,8 +43,8 @@ static void rna_Text_filename_get(PointerRNA *ptr, char *value)
{
Text *text = (Text *)ptr->data;
- if (text->name) {
- strcpy(value, text->name);
+ if (text->filepath) {
+ strcpy(value, text->filepath);
}
else {
value[0] = '\0';
@@ -54,22 +54,22 @@ static void rna_Text_filename_get(PointerRNA *ptr, char *value)
static int rna_Text_filename_length(PointerRNA *ptr)
{
Text *text = (Text *)ptr->data;
- return (text->name) ? strlen(text->name) : 0;
+ return (text->filepath) ? strlen(text->filepath) : 0;
}
static void rna_Text_filename_set(PointerRNA *ptr, const char *value)
{
Text *text = (Text *)ptr->data;
- if (text->name) {
- MEM_freeN(text->name);
+ if (text->filepath) {
+ MEM_freeN(text->filepath);
}
if (value[0]) {
- text->name = BLI_strdup(value);
+ text->filepath = BLI_strdup(value);
}
else {
- text->name = NULL;
+ text->filepath = NULL;
}
}