From c705ec182de40b0293de3a0b1256b8fc4bab18e5 Mon Sep 17 00:00:00 2001 From: Mark Eggert <72320499+TikiBear@users.noreply.github.com> Date: Fri, 13 Aug 2021 22:53:34 -0700 Subject: [PATCH] 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. --- korman/exporter/rtlight.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/korman/exporter/rtlight.py b/korman/exporter/rtlight.py index 9efc51c..ed0e0de 100644 --- a/korman/exporter/rtlight.py +++ b/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, we will harvest all Blender lamps in that light group that are Plasma Objects lg = bm.light_group + lcount = 0 if lg is not None: for obj in lg.objects: if obj.type != "LAMP": @@ -291,6 +292,10 @@ class LightConverter: else: self._report.msg("[{}] PermaLight '{}'", lamp.type, obj.name, indent=2) 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)