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.
This commit is contained in:
Ton Roosendaal 2010-12-29 11:34:02 +00:00
parent 7115a8d200
commit c802e21dbb

@ -1706,6 +1706,9 @@ 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 *********************/