[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3892] contrib/py/scripts/addons/ io_mesh_xyz/__init__.py: When loading the shape key one needs to be in the OBJECT mode ...

Clemens Barth barth at root-1.de
Thu Oct 25 20:47:07 CEST 2012


Revision: 3892
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3892
Author:   blendphys
Date:     2012-10-25 18:47:07 +0000 (Thu, 25 Oct 2012)
Log Message:
-----------
When loading the shape key one needs to be in the OBJECT mode ... .

Modified Paths:
--------------
    contrib/py/scripts/addons/io_mesh_xyz/__init__.py

Modified: contrib/py/scripts/addons/io_mesh_xyz/__init__.py
===================================================================
--- contrib/py/scripts/addons/io_mesh_xyz/__init__.py	2012-10-25 09:35:48 UTC (rev 3891)
+++ contrib/py/scripts/addons/io_mesh_xyz/__init__.py	2012-10-25 18:47:07 UTC (rev 3892)
@@ -425,6 +425,9 @@
     bl_description = "Delete the shape keys"
 
     def execute(self, context):
+
+        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
+
         for element in import_xyz.STRUCTURE:
             if element.data.shape_keys == None:
                 break
@@ -448,6 +451,8 @@
     def execute(self, context):
         global ATOM_XYZ_ERROR
         scn = bpy.context.scene.atom_xyz[0]
+
+        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
         
         KEYS_PRESENT = False
         for element in import_xyz.STRUCTURE:



More information about the Bf-extensions-cvs mailing list