Browse Source

Fix export crash introduced by #110

If there were no lightmapping passes, the `max()` call would raise a
ValueError.
pull/114/head
Adam Johnson 6 years ago
parent
commit
07e73f7792
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 5
      korman/exporter/etlight.py

5
korman/exporter/etlight.py

@ -106,7 +106,10 @@ class LightBaker(_MeshManager):
# Lightmap passes are expensive, so we will warn about any passes that seem
# particularly wasteful.
largest_pass = max((len(value) for key, value in bake.items() if key[0] != "vcol"))
try:
largest_pass = max((len(value) for key, value in bake.items() if key[0] != "vcol"))
except ValueError:
largest_pass = 0
# Step 0.9: Make all layers visible.
# This prevents context operators from phailing.

Loading…
Cancel
Save