From cf6493491297a05e0e4bcfd7b9e6c7b6b7b2ef86 Mon Sep 17 00:00:00 2001
From: Thomas Larsson <thomas_larsson_01@hotmail.com>
Date: Mon, 16 Sep 2013 08:52:33 +0000
Subject: [PATCH] Fixed crash when importing a rigifiable armature.

---
 io_import_scene_mhx.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index 8ba9e625f..147ee6ed4 100644
--- a/io_import_scene_mhx.py
+++ b/io_import_scene_mhx.py
@@ -2520,6 +2520,7 @@ class RigifyBone:
 
 
 def rigifyMhx(context):
+    global theArmature
     from collections import OrderedDict
 
     print("Modifying MHX rig to Rigify")
@@ -2701,6 +2702,7 @@ def rigifyMhx(context):
     del rig
     gen.name = name
     bpy.ops.object.mode_set(mode='POSE')
+    theArmature = gen
     print("MHX rig %s successfully rigified" % name)
 
 
-- 
GitLab