Browse Source

Warn if more than 8 RT lamps are on a material.

I'm probably late to the party, but I have found that PotS can't handle more than 8 RT lamps on one material. This might vary by target engine, though, so no failure pronouncement is made.
pull/275/head
Mark Eggert 3 years ago committed by GitHub
parent
commit
c705ec182d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      korman/exporter/rtlight.py

5
korman/exporter/rtlight.py

@ -258,6 +258,7 @@ class LightConverter:
# If there is no light group, we'll say that there is no runtime lighting... # If there is no light group, we'll say that there is no runtime lighting...
# If there is, we will harvest all Blender lamps in that light group that are Plasma Objects # If there is, we will harvest all Blender lamps in that light group that are Plasma Objects
lg = bm.light_group lg = bm.light_group
lcount = 0
if lg is not None: if lg is not None:
for obj in lg.objects: for obj in lg.objects:
if obj.type != "LAMP": if obj.type != "LAMP":
@ -291,6 +292,10 @@ class LightConverter:
else: else:
self._report.msg("[{}] PermaLight '{}'", lamp.type, obj.name, indent=2) self._report.msg("[{}] PermaLight '{}'", lamp.type, obj.name, indent=2)
permaLights.append(pl_light) permaLights.append(pl_light)
lcount = lcount + 1
if lcount > 8:
self._report.warn("More than 8 RT lamps on material: '{}'".format(bm.name), indent=1)
return (permaLights, permaProjs) return (permaLights, permaProjs)

Loading…
Cancel
Save