powroupi / blender_mmd_tools

mmd_tools is a blender addon for importing Models and Motions of MikuMikuDance.
GNU General Public License v3.0
1.83k stars 277 forks source link

Shading error again #210

Closed Darkblader24 closed 5 years ago

Darkblader24 commented 5 years ago

Here is the error: https://i.imgur.com/cs4w4k5.png

powroupi commented 5 years ago

Okay, It should be fixed now. I'm not sure how it happens, though. :sweat_smile: I would like to know how YYYOpenAndImport.py works. Did you run it via Console without opening Blender?

Darkblader24 commented 5 years ago

I start Blender via a bat file which contains this line: %BasePath%blender.exe -P %BasePath%YYYOpenAndImport.py -- %1 This opens Blender and automatically starts the YYYOpenAndImport.py script in which "bpy.ops.mmd_tools.set_shadeless_glsl_shading()" is called. I assume Blender is not fully loaded at that point in time.

But this fixed the error, so thanks 👍

powroupi commented 5 years ago

Okay, you're welcome. :smile: I had never considered that case, thanks for the report. :)