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>2012-10-24 08:29:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-24 08:29:35 +0400
commitdb250a48f615ed36b368412deedaa77f59366d61 (patch)
treedcf6737963325f0bb3112d93ec74a5f65507819c /source/blender/editors/space_file/filesel.c
parentcbc734dd79e3845c1a89109d59a3eeee57e087ce (diff)
fix [#32855] Obj im and export and the file path and name
file selector now uses previously used settings for operators rather then over riding them with the currently open blend file.
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 746f5f22df9..8d0f90f5931 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -94,6 +94,9 @@ FileSelectParams *ED_fileselect_get_params(struct SpaceFile *sfile)
return sfile->params;
}
+/**
+ * \note RNA_struct_property_is_set_ex is used here because we wan't
+ * the previously used settings to be used here rather then overriding them */
short ED_fileselect_set_params(SpaceFile *sfile)
{
FileSelectParams *params;
@@ -124,7 +127,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
else
params->type = FILE_SPECIAL;
- if (is_filepath && RNA_struct_property_is_set(op->ptr, "filepath")) {
+ if (is_filepath && RNA_struct_property_is_set_ex(op->ptr, "filepath", FALSE)) {
char name[FILE_MAX];
RNA_string_get(op->ptr, "filepath", name);
if (params->type == FILE_LOADLIB) {
@@ -136,12 +139,12 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
}
else {
- if (is_directory && RNA_struct_property_is_set(op->ptr, "directory")) {
+ if (is_directory && RNA_struct_property_is_set_ex(op->ptr, "directory", FALSE)) {
RNA_string_get(op->ptr, "directory", params->dir);
sfile->params->file[0] = '\0';
}
- if (is_filename && RNA_struct_property_is_set(op->ptr, "filename")) {
+ if (is_filename && RNA_struct_property_is_set_ex(op->ptr, "filename", FALSE)) {
RNA_string_get(op->ptr, "filename", params->file);
}
}
@@ -228,7 +231,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
if (is_relative_path) {
- if (!RNA_struct_property_is_set(op->ptr, "relative_path")) {
+ if (!RNA_struct_property_is_set_ex(op->ptr, "relative_path", FALSE)) {
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
}
}