Using python's any function to inherit involved materials' attr

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Yue JIN 2020-09-10 10:50:17 +08:00 committed by GitHub
parent b7a4beff5c
commit ccd76516f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1081,10 +1081,7 @@ class Material(IDManagerMixin):
# If any of the involved materials is depletable, the new material is
# depletable
for mat in materials:
if mat.depletable:
new_mat.depletable = True
break
new_mat.depletable = any(mat.depletable for mat in materials)
return new_mat