[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4713] trunk/py/scripts/addons/ io_import_scene_mhx.py: Leaves imported rig in object mode and don' t issue a popup on success.

Thomas Larsson thomas_larsson_01 at hotmail.com
Sat Aug 31 05:40:50 CEST 2013


Revision: 4713
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4713
Author:   thomasl
Date:     2013-08-31 03:40:49 +0000 (Sat, 31 Aug 2013)
Log Message:
-----------
Leaves imported rig in object mode and don't issue a popup on success.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_import_scene_mhx.py

Modified: trunk/py/scripts/addons/io_import_scene_mhx.py
===================================================================
--- trunk/py/scripts/addons/io_import_scene_mhx.py	2013-08-31 00:32:33 UTC (rev 4712)
+++ trunk/py/scripts/addons/io_import_scene_mhx.py	2013-08-31 03:40:49 UTC (rev 4713)
@@ -38,7 +38,7 @@
 bl_info = {
     'name': 'Import: MakeHuman (.mhx)',
     'author': 'Thomas Larsson',
-    'version': (1, 16, 2),
+    'version': (1, 16, 3),
     "blender": (2, 68, 0),
     'location': "File > Import > MakeHuman (.mhx)",
     'description': 'Import files in the MakeHuman eXchange format (.mhx)',
@@ -51,7 +51,7 @@
 MAJOR_VERSION = 1
 MINOR_VERSION = 16
 FROM_VERSION = 13
-SUB_VERSION = 1
+SUB_VERSION = 3
 
 majorVersion = MAJOR_VERSION
 minorVersion = MINOR_VERSION
@@ -306,6 +306,9 @@
             #MyError(msg)
 
     scn.objects.active = theArmature
+    bpy.ops.object.mode_set(mode='OBJECT')
+    bpy.ops.object.select_all(action='DESELECT')
+    theArmature.select = True
     theArmature.MhAlpha8 = not alpha7
     #bpy.ops.wm.properties_edit(data_path="object", property="MhxRig", value=theArmature["MhxRig"])
 
@@ -3002,7 +3005,7 @@
             if not context.user_preferences.system.use_scripts_auto_execute:
                 MyError("Auto Run Python Scripts must be turned on.\nIt is found under\n File > User Preferences > File")
             readMhxFile(self.filepath)
-            bpy.ops.mhx.success('INVOKE_DEFAULT', message = self.filepath)
+            #bpy.ops.mhx.success('INVOKE_DEFAULT', message = self.filepath)
         except MhxError:
             print("Error when loading MHX file %s:\n" % self.filepath + theMessage)
 



More information about the Bf-extensions-cvs mailing list