[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45371] trunk/blender/release/scripts/ startup/bl_operators/image.py: avoid confusion with image 'Edit Externally' operator, disallow editing of packed images, resolves bug [#30506].

Campbell Barton ideasman42 at gmail.com
Tue Apr 3 14:02:33 CEST 2012


Revision: 45371
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45371
Author:   campbellbarton
Date:     2012-04-03 12:02:32 +0000 (Tue, 03 Apr 2012)
Log Message:
-----------
avoid confusion with image 'Edit Externally' operator, disallow editing of packed images, resolves bug [#30506].

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_operators/image.py

Modified: trunk/blender/release/scripts/startup/bl_operators/image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/image.py	2012-04-03 11:56:01 UTC (rev 45370)
+++ trunk/blender/release/scripts/startup/bl_operators/image.py	2012-04-03 12:02:32 UTC (rev 45371)
@@ -96,6 +96,10 @@
             self.report({'ERROR'}, "Context incorrect, image not found")
             return {'CANCELLED'}
 
+        if image.packed_file:
+            self.report({'ERROR'}, "Image is packed, unpack before editing")
+            return {'CANCELLED'}
+
         filepath = bpy.path.abspath(image.filepath, library=image.library)
 
         self.filepath = os.path.normpath(filepath)




More information about the Bf-blender-cvs mailing list