Browse Source

Fix if-in-dict antipattern in material code

pull/133/head
Adam Johnson 6 years ago
parent
commit
df73d26896
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 6
      korman/exporter/material.py

6
korman/exporter/material.py

@ -255,10 +255,8 @@ class MaterialConverter:
hsgmat.addLayer(layer.key)
# Cache this material for later
if bo in self._obj2mat:
self._obj2mat[bo].append(hsgmat.key)
else:
self._obj2mat[bo] = [hsgmat.key]
mat_list = self._obj2mat.setdefault(bo, [])
mat_list.append(hsgmat.key)
# Looks like we're done...
return hsgmat.key

Loading…
Cancel
Save