Browse Source

Suppress "Use Vertex Color Paint" for lightmaps

This prevents lighting from being rendered to a texture, as noticed by
@deledrius
pull/77/head
Adam Johnson 7 years ago
parent
commit
5e067388b3
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 12
      korman/exporter/etlight.py

12
korman/exporter/etlight.py

@ -352,13 +352,23 @@ class LightBaker:
if isinstance(objs, bpy.types.Object):
toggle.track(objs, "hide_render", False)
for i in bpy.data.objects:
i.select = i == objs
if i == objs:
# prevents proper baking to texture
for mat in i.data.materials:
toggle.track(mat, "use_vertex_color_paint", False)
i.select = True
else:
i.select = False
if isinstance(i.data, bpy.types.Mesh) and not self._has_valid_material(i):
toggle.track(i, "hide_render", True)
else:
for i in bpy.data.objects:
value = i in objs
if value:
# prevents proper baking to texture
for mat in i.data.materials:
toggle.track(mat, "use_vertex_color_paint", False)
toggle.track(i, "hide_render", False)
elif isinstance(i.data, bpy.types.Mesh) and not self._has_valid_material(i):
toggle.track(i, "hide_render", True)

Loading…
Cancel
Save