lunadigital / btoa

A community-developed Blender add-on for the Arnold renderer.
GNU General Public License v3.0
134 stars 9 forks source link

Blender returns UI warning if an object doesn't have materials applied #240

Closed osiriswrecks closed 8 months ago

osiriswrecks commented 10 months ago
Python: Traceback (most recent call last):
  File "/Users/sraaf1/Library/Application Support/Blender/4.0/scripts/addons/btoa-dev/ui/material.py", line 92, in draw
    layout.prop(mat, "use_nodes", icon='NODETREE')
TypeError: UILayout.prop(): error with argument 1, "data" -  Function.data does not support a 'None' assignment AnyType type
Python: Traceback (most recent call last):
  File "/Users/sraaf1/Library/Application Support/Blender/4.0/scripts/addons/btoa-dev/ui/material.py", line 82, in draw_header_preset
    if material.arnold:
AttributeError: 'NoneType' object has no attribute 'arnold'
Python: Traceback (most recent call last):
  File "/Users/sraaf1/Library/Application Support/Blender/4.0/scripts/addons/btoa-dev/ui/material.py", line 72, in draw
    if not mat.arnold.node_tree:
AttributeError: 'NoneType' object has no attribute 'arnold'