Browse Source

Fix potential blender crash during export.

Blender can crash during export when baking vertex colors to shared mesh
data objects. Doing that can lead to lighting gotchas, but it's better
to have lighting gotchas than crashes.
pull/176/merge
Adam Johnson 4 years ago
parent
commit
16b0ebdc15
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 7
      korman/exporter/etlight.py

7
korman/exporter/etlight.py

@ -375,12 +375,9 @@ class LightBaker(_MeshManager):
if not self._generate_lightgroup(bo, user_lg): if not self._generate_lightgroup(bo, user_lg):
return False return False
# I have heard tale of some moar "No valid image to bake to" boogs if there is a really
# old copy of the autocolor layer on the mesh. Nuke it.
autocolor = vcols.get("autocolor") autocolor = vcols.get("autocolor")
if autocolor is not None: if autocolor is None:
vcols.remove(autocolor) autocolor = vcols.new("autocolor")
autocolor = vcols.new("autocolor")
toggle.track(vcols, "active", autocolor) toggle.track(vcols, "active", autocolor)
# Mark "autocolor" as our active render layer # Mark "autocolor" as our active render layer

Loading…
Cancel
Save