From 4f6cbf81224fe04a73d8a45afe15c1d7641c804d Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Mon, 14 Jul 2025 02:00:25 +0200 Subject: [PATCH] extend DATA_PT_light w/ color --- renderer.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/renderer.py b/renderer.py index a0c307f..145b728 100644 --- a/renderer.py +++ b/renderer.py @@ -375,6 +375,27 @@ def draw_render_settings(self, context: bpy.types.Context): self.layout.popover(F64RenderSettingsPanel.bl_idname) +# The light color is only shown in the UI in the DATA_PT_EEVEE_light panel, +# which is only shown with EEVEE enabled. The DATA_PT_light panel is shown otherwise, +# but only allows changing the light type. +# This panel extends the DATA_PT_light panel to allow setting the light color. +class LightDataPanel(bpy.types.Panel): + bl_label = "f64render light data" + bl_idname = "DATA_PT_f64render_light_data" + bl_space_type = "PROPERTIES" + bl_region_type = "WINDOW" + bl_context = "data" + bl_parent_id = "DATA_PT_light" + bl_options = {"HIDE_HEADER"} + + @classmethod + def poll(cls, context): + return context.scene is not None and context.scene.render.engine == Fast64RenderEngine.bl_idname + + def draw(self, context): + self.layout.prop(context.light, "color") + + # By default blender will hide quite a few panels like materials or vertex attributes # Add this method to override the check blender does by render engine def get_panels():