Skip to main content
Participant
March 11, 2022
Question

Simple Bug in Blender Addon

  • March 11, 2022
  • 3 replies
  • 707 views
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
This topic has been closed for replies.

3 replies

PCA_72
Participating Frequently
December 29, 2022

Hi, is this information relative with a bug from loading the correct project material with SBSAR ?

I've encountered some bugs in the latest Blender versions and the Painter add-on. Loading materials errors and a lost of the sbsar materials already configured in the blender project. Not being able to load back the previously configured materials make the use of the add-on hazardous, especially if you've deadlines. Sad. Hope this can be solved rapidly.

Community Manager
January 12, 2023

Hi,

Could you share more information about what Painter Addon you are talking about?
Also, could you share the logs from the Blender console/terminal? 

PCA_72
Participating Frequently
January 12, 2023

Hi,

 

Painter Addon for Blender (Mac OSX 64) ver: 1.0.1

Substance integration tools 1.4.5

Inspiring
March 25, 2022

Just want to update you that this issue has been prioritized and is currently on our backlog. 

Community Manager
March 11, 2022

Thanks for reporting this issue and for the detailed information on a potential fix. We will investigate this.