diff options
author | Ton Roosendaal <ton@blender.org> | 2010-12-29 14:34:02 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-12-29 14:34:02 +0300 |
commit | c802e21dbb150ea7022b329e11e41335e13e5550 (patch) | |
tree | 23a22f342ee67267af2cf00e2dfc9aa97512ee40 /source/blender/editors/curve | |
parent | 7115a8d200fbc04dc824649796a6b8a52bd36d97 (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.c | 7 |
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 *********************/ |