Skip to content
Snippets Groups Projects
Commit c795106a authored by Nathan Vegdahl's avatar Nathan Vegdahl
Browse files

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!
parent 9b3d305e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment