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:
authorMatt Ebb <matt@mke3.net>2010-01-27 05:20:24 +0300
committerMatt Ebb <matt@mke3.net>2010-01-27 05:20:24 +0300
commit904665f15b9a0bc165c6ee60f05f00d66c2ffc07 (patch)
tree97861f19c9fc3b4d9d904daccfe80e9c87ad9d81 /release
parent0bb36e9ced06b04b961300b21211f456c7035bcf (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 'release')
-rw-r--r--release/scripts/op/uv.py1
-rw-r--r--release/scripts/ui/space_info.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/op/uv.py b/release/scripts/op/uv.py
index 619c1e6f502..76675cb96a9 100644
--- a/release/scripts/op/uv.py
+++ b/release/scripts/op/uv.py
@@ -30,6 +30,7 @@ class ExportUVLayout(bpy.types.Operator):
bl_undo = True
path = StringProperty(name="File Path", description="File path used for exporting the SVG file", maxlen=1024, default="")
+ check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, hidden=True)
only_selected = BoolProperty(name="Only Selected", description="Export Only the selected UVs", default=False)
def poll(self, context):
diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py
index fb9f0f278b3..d027700ccd4 100644
--- a/release/scripts/ui/space_info.py
+++ b/release/scripts/ui/space_info.py
@@ -83,7 +83,7 @@ class INFO_MT_file(bpy.types.Menu):
layout.separator()
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK')
+ layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK').check_existing = False
layout.operator_context = 'INVOKE_AREA'
layout.operator("wm.save_as_mainfile", text="Save As...")