[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3436] trunk/py/scripts/addons/ io_import_scene_mhx.py: Mhx importer.

Thomas Larsson thomas_larsson_01 at hotmail.com
Fri Jun 1 14:59:39 CEST 2012


Revision: 3436
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3436
Author:   thomasl
Date:     2012-06-01 12:59:39 +0000 (Fri, 01 Jun 2012)
Log Message:
-----------
Mhx importer. Rigs other than the mhx rig can now access the MHX Drivers panel. Drivers for facial shapes are located there.

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	2012-06-01 12:58:35 UTC (rev 3435)
+++ trunk/py/scripts/addons/io_import_scene_mhx.py	2012-06-01 12:59:39 UTC (rev 3436)
@@ -3954,7 +3954,7 @@
     
     @classmethod
     def poll(cls, context):
-        return pollMhxRig(context.object)
+        return (mhxRigName(context.object) == 'MHX')
 
     def draw(self, context):
         rig = context.object
@@ -4035,7 +4035,7 @@
     
     @classmethod
     def poll(cls, context):
-        return pollMhxRig(context.object)
+        return mhxRigName(context.object)
 
     def draw(self, context):
         lProps = []
@@ -4083,7 +4083,7 @@
     
     @classmethod
     def poll(cls, context):
-        return pollMhxRig(context.object)
+        return mhxRigName(context.object)
 
     def draw(self, context):
         ob = context.object
@@ -4205,7 +4205,7 @@
     
     @classmethod
     def poll(cls, context):
-        return pollMhxRig(context.object)
+        return (mhxRigName(context.object) == 'MHX')
 
     def draw(self, context):
         layout = self.layout
@@ -4262,11 +4262,11 @@
 #   getMhxRig(ob):
 #
 
-def pollMhxRig(ob):
+def mhxRigName(ob):
     try:
-        return (ob["MhxRig"] == "MHX")
+        return ob["MhxRig"]
     except:
-        return False
+        return None
         
 def getMhxRig(ob):
     if ob.type == 'ARMATURE':



More information about the Bf-extensions-cvs mailing list