diff options
author | Matt Ebb <matt@mke3.net> | 2010-01-27 05:20:24 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-01-27 05:20:24 +0300 |
commit | 904665f15b9a0bc165c6ee60f05f00d66c2ffc07 (patch) | |
tree | 97861f19c9fc3b4d9d904daccfe80e9c87ad9d81 /source/blender/editors/space_image | |
parent | 0bb36e9ced06b04b961300b21211f456c7035bcf (diff) |
[#20728] "Export UV Layout" overwrites existing files (without feedback)
The 'save over' popup was only appearing based on a string comparison of the operator name ("Save"). Changed this to use a hidden operator property: "check_existing". Python operators must
have this property for the file selector confirmation too.
This property can also be set to false, to prevent checking for existing files, useful in the File->Save menu item to prevent the dangerously missable confirmation popup.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index b730f075f8f..7dd26c31658 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -741,7 +741,7 @@ void IMAGE_OT_open(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL); + WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPEN); } /******************** replace image operator ********************/ @@ -794,7 +794,7 @@ void IMAGE_OT_replace(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL); + WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPEN); } /******************** save image as operator ********************/ @@ -962,7 +962,7 @@ void IMAGE_OT_save_as(wmOperatorType *ot) /* properties */ RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as."); - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL); + WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE); } /******************** save image operator ********************/ |