From 4be5a985aec3003dbf137ac79aa045a95ede290e Mon Sep 17 00:00:00 2001 From: Thomas Larsson <thomas_larsson_01@hotmail.com> Date: Fri, 1 Jun 2012 12:59:39 +0000 Subject: [PATCH] Mhx importer. Rigs other than the mhx rig can now access the MHX Drivers panel. Drivers for facial shapes are located there. --- io_import_scene_mhx.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py index 0f9d86759..79fe4c2f3 100644 --- a/io_import_scene_mhx.py +++ b/io_import_scene_mhx.py @@ -3954,7 +3954,7 @@ class MhxFKIKPanel(bpy.types.Panel): @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 @@ class MhxDriversPanel(bpy.types.Panel): @classmethod def poll(cls, context): - return pollMhxRig(context.object) + return mhxRigName(context.object) def draw(self, context): lProps = [] @@ -4083,7 +4083,7 @@ class MhxVisibilityPanel(bpy.types.Panel): @classmethod def poll(cls, context): - return pollMhxRig(context.object) + return mhxRigName(context.object) def draw(self, context): ob = context.object @@ -4205,7 +4205,7 @@ class MhxLayersPanel(bpy.types.Panel): @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 @@ class VIEW3D_OT_MhxDisableAllLayersButton(bpy.types.Operator): # 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': -- GitLab