Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/rigify
diff options
context:
space:
mode:
authorNathan Vegdahl <cessen@cessen.com>2013-01-22 22:51:08 +0400
committerNathan Vegdahl <cessen@cessen.com>2013-01-22 22:51:08 +0400
commitc795106a1aacd0bc6b906bf2c9a68649b19541fc (patch)
tree26ddb86f0ad104457e90153de6d6107e22813a1e /rigify
parent9b3d305e5aa7969d3198b06b0fe3b86768d96878 (diff)
Rigify: patch from Shinsuke Irie fixing rig imports on some systems.
From the report: This patch fixes a bug that rig modules of 'arm' and 'leg' cannot be loaded failing as follows: Rigify: No module named 'rigify.rigs.biped.arm.biped' Rigify: No module named 'rigify.rigs.biped.leg.biped' I couldn't reproduce the error, but new code works on my system just as well as the old code, so I assume this serves to make the code more robust on a larger range of systems. Thanks Shinsuke!
Diffstat (limited to 'rigify')
-rw-r--r--rigify/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rigify/utils.py b/rigify/utils.py
index e97fce79..bcb13a66 100644
--- a/rigify/utils.py
+++ b/rigify/utils.py
@@ -396,7 +396,10 @@ def get_rig_type(rig_type):
""" Fetches a rig module by name, and returns it.
"""
#print("%s.%s.%s" % (__package__,RIG_DIR,rig_type))
- submod = __import__(name="%s.%s.%s" % (MODULE_NAME, RIG_DIR, rig_type), fromlist=[rig_type])
+ name="%s.%s.%s" % (MODULE_NAME, RIG_DIR, rig_type)
+ submod = __import__(name)
+ for c in (name.split("."))[1:]:
+ submod = getattr(submod, c)
imp.reload(submod)
return submod