diff --git a/korman/exporter/rtlight.py b/korman/exporter/rtlight.py index 58d8897..9411a26 100644 --- a/korman/exporter/rtlight.py +++ b/korman/exporter/rtlight.py @@ -193,7 +193,7 @@ class LightConverter: # If the lamp has any sort of animation attached, then it needs to be marked movable. # Otherwise, Plasma may not use it for lighting. - if projectors or bo.plasma_object.has_animation_data: + if projectors or bo.plasma_object.has_animation_data or rtlamp.runtime_lamp == True: pl_light.setProperty(plLightInfo.kLPMovable, True) # *Sigh* diff --git a/korman/properties/prop_lamp.py b/korman/properties/prop_lamp.py index c1c4d33..2240130 100644 --- a/korman/properties/prop_lamp.py +++ b/korman/properties/prop_lamp.py @@ -63,6 +63,11 @@ class PlasmaLamp(idprops.IDPropObjectMixin, bpy.types.PropertyGroup): description="Size of the area for the Area Lamp in the Z direction", min=0.0, default=200.0, options=set()) + # For Runtime Lights without animation + runtime_lamp = BoolProperty(name="Runtime Lamp", + description="Allows the lamp to cast light in real time", + default=False, + options=set()) def has_light_group(self, bo): return bool(bo.users_group) diff --git a/korman/ui/ui_lamp.py b/korman/ui/ui_lamp.py index 7c89b82..3c3f0a4 100644 --- a/korman/ui/ui_lamp.py +++ b/korman/ui/ui_lamp.py @@ -67,7 +67,17 @@ class PlasmaShadowPanel(LampButtonsPanel, bpy.types.Panel): col.prop(rtlamp, "shadow_power") col.prop(rtlamp, "shadow_falloff") col.prop(rtlamp, "shadow_distance") - + +class PlasmaRuntimeLampPanel(LampButtonsPanel, bpy.types.Panel): + bl_label = "Runtime Lamp" + + def draw(self, context): + layout = self.layout + rtlamp = context.lamp.plasma_lamp + + split = layout.split() + col = split.column() + col.prop(rtlamp, "runtime_lamp") def _draw_area_lamp(self, context): """Draw dispatch function for DATA_PT_area"""