Skip to content

Commit

Permalink
Fix when texture name doesn't exist or when material is blank string.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fmstrat authored and furti committed Feb 1, 2022
1 parent e3af619 commit 06b81a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion texture_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ def isTexturable(self, o):
if not hasattr(o, 'Shape') or o.Shape is None or o.Shape.isNull():
return False

if not hasattr(o, 'Material') or o.Material is None:
if not hasattr(o, 'Material') or o.Material is None or o.Material == '':
return False

if not hasattr(o.Material, 'Name') or o.Material.Name is None or o.Material.Name == '':
return False

return o.ViewObject.Visibility
Expand Down

0 comments on commit 06b81a3

Please sign in to comment.