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:
authorTon Roosendaal <ton@blender.org>2010-12-29 14:34:02 +0300
committerTon Roosendaal <ton@blender.org>2010-12-29 14:34:02 +0300
commitc802e21dbb150ea7022b329e11e41335e13e5550 (patch)
tree23a22f342ee67267af2cf00e2dfc9aa97512ee40 /source/blender/editors/curve
parent7115a8d200fbc04dc824649796a6b8a52bd36d97 (diff)
Bugfix #25397
Loading a vector font (.ttf) didn't have option for Relative Path in the file window. Now it does, and it sets it to the default. Todo note: the actual path is not visible in the UI yet, nor does outliner RNA view allow to edit path.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editfont.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 0010332c8d9..ab80a7a6ead 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1705,7 +1705,10 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
}
path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir;
-
+
+ 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, "filepath"))
return open_exec(C, op);
@@ -1730,7 +1733,7 @@ void FONT_OT_open(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- WM_operator_properties_filesel(ot, FOLDERFILE|FTFONTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH);
+ WM_operator_properties_filesel(ot, FOLDERFILE|FTFONTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH);
}
/******************* delete operator *********************/