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) hsgmat.addLayer(layer.key)
# Cache this material for later # Cache this material for later
if bo in self._obj2mat: mat_list = self._obj2mat.setdefault(bo, [])
self._obj2mat[bo].append(hsgmat.key) mat_list.append(hsgmat.key)
else:
self._obj2mat[bo] = [hsgmat.key]
# Looks like we're done... # Looks like we're done...
return hsgmat.key return hsgmat.key

Loading…
Cancel
Save