From c802e21dbb150ea7022b329e11e41335e13e5550 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 29 Dec 2010 11:34:02 +0000 Subject: [PATCH] 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. --- source/blender/editors/curve/editfont.c | 7 +++++-- 1 file 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 *********************/