Question
Simple Bug in Blender Addon
I've encountered a bug while using the Substance3DInBlender addon, and it has a simple fix.
In the function "RefreshLoadedSBSARData" in the "persistance.py" file, in line 170, it tries to get mat.name for each material slot of every object in bpy.data.objects. The problem is, if an object has an empty material slot, it will return None for "mat" (it won't skip the empty slots) and the script gives an exception and stops working because it tries to get the ".name" attribute of a NoneType object.
The exact line that breaks the script is:
sbsarIndex = bpy.context.scene.loadedSbsars.find(mat.name)
It is simply solved by continuing the for loop if "mat" is None, by adding something like this before the line above:
if not mat:
continue
