Fix: Use Color Temperature prop subtype for light temperature

The light objects' Color Temperature prop introduced in a12bce039f
currently is a temperature subtype. This means it is expressed in °C
if the user set that as scene unit, but a color temperature should
always be expressed in Kelvin.

Pull Request: https://projects.blender.org/blender/blender/pulls/139661
This commit is contained in:
Damien Picard
2025-06-02 12:25:40 +02:00
committed by Brecht Van Lommel
parent f9a9080f16
commit 0e8d041cb3

View File

@@ -165,7 +165,7 @@ static void rna_def_light(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Color", "Light color");
RNA_def_property_update(prop, 0, "rna_Light_draw_update");
prop = RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_TEMPERATURE);
prop = RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_COLOR_TEMPERATURE);
RNA_def_property_float_sdna(prop, nullptr, "temperature");
RNA_def_property_range(prop, 800.0f, 20000.0f);
RNA_def_property_ui_range(prop, 800.0f, 20000.0f, 400.0f, 1);