Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-04-10 17:27:09 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-04-10 17:27:09 +0300
commit83ca4a3f61aeb88f9d739227d9bf9bd9222c82fe (patch)
treecd29c181f1f35fba131dd3e21a7f8be3761b6e85
parent73bf474a6df0d2ad6524da9449b01a02620b669f (diff)
Fix T44339: Edit Linked Library bad error when current file is not saved on disk.
Just abort when trying to (auto)save current file and it does not exists on disk yet.
-rw-r--r--object_edit_linked.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/object_edit_linked.py b/object_edit_linked.py
index 37ea839d..fb243c16 100644
--- a/object_edit_linked.py
+++ b/object_edit_linked.py
@@ -20,8 +20,8 @@
bl_info = {
"name": "Edit Linked Library",
"author": "Jason van Gumster (Fweeb), Bassam Kurdali, Pablo Vazquez",
- "version": (0, 8, 0),
- "blender": (2, 65, 0),
+ "version": (0, 8, 1),
+ "blender": (2, 74, 0),
"location": "View3D > Toolshelf > Edit Linked Library",
"description": "Allows editing of objects linked from a .blend library.",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
@@ -102,6 +102,10 @@ class EditLinked(bpy.types.Operator):
print(target.name + " is linked to " + targetpath)
if self.use_autosave:
+ if not bpy.data.filepath:
+ # File is not saved on disk, better to abort!
+ self.report({'ERROR'}, "Current file does not exist on disk, we cannot autosave it, aborting")
+ return {'CANCELLED'}
bpy.ops.wm.save_mainfile()
settings["original_file"] = bpy.data.filepath