09th / YABEE

Export models from the Blender to Panda3D game engine
MIT License
107 stars 39 forks source link

Fix crash when exporting without assigned material #42

Closed fireclawthefox closed 5 years ago

fireclawthefox commented 5 years ago

Simply moved the if statement to check for use_nodes on the material inside the check if a material is actually given. This otherwise crashed with AttributeError: 'NoneType' object has no attribute 'use_nodes' if no material were assigned to a model prior to exporting it.

rdb commented 5 years ago

Thanks, I hope it's OK that I took the liberty of merging this since other people were running into this issue.

Zbysekz commented 5 years ago

I did the same in opened pull request #41 , but doesn't matter. Please close it and also the associated issue.