sugiany / blender_mmd_tools

mmd_tools is a blender addon for importing Models and Motions of MikuMikuDance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blender r53161 or later fails to load mmd_tools addon

iRi-E opened this issue · comments

Since r53161, Blender disallows access to the context while addons import and register, so loading mmd_tools addon throws an error as follows and it's not usable:

Exception in module register(): '/home/irie/.config/blender/2.65/scripts/addons_extern/mmd_tools/__init__.py'
Traceback (most recent call last):
  File "/usr/share/blender/2.65/scripts/modules/addon_utils.py", line 290, in enable
    mod.register()
  File "/home/irie/.config/blender/2.65/scripts/addons_extern/mmd_tools/__init__.py", line 144, in register
    cycles_converter.create_MMDBasicShader()
  File "/home/irie/.config/blender/2.65/scripts/addons_extern/mmd_tools/cycles_converter.py", line 5, in create_MMDBasicShader
    bpy.context.scene.render.engine = 'CYCLES'
AttributeError: '_RestrictedContext' object has no attribute 'scene'

See the following for detail:

http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53161
http://projects.blender.org/tracker/?func=detail&atid=498&aid=33618&group_id=9
http://lists.blender.org/pipermail/bf-python/2012-December/005987.html