Fix #142103: Animation decorator not working on Light Temperature value
When having a checkbox and a value both in one row together with an
animation decorator it is questionable whether the decorator should act
on animating the checkbox or the corresponding value.
We had similar cases before (e.g. 7c04ef210e)
In this case as well, one would think it is more desirable to animate
the actual Temperature **value** (instead of the checkbox), so this is
what this PR does.
Pull Request: https://projects.blender.org/blender/blender/pulls/142192
This commit is contained in:
committed by
Philipp Oeser
parent
d64ace7799
commit
2fd36b0ab7
@@ -1518,6 +1518,7 @@ class CYCLES_LIGHT_PT_light(CyclesButtonsPanel, Panel):
|
||||
col = layout.column()
|
||||
heading = col.column(align=True, heading="Temperature")
|
||||
row = heading.column(align=True).row(align=True)
|
||||
row.use_property_decorate = False
|
||||
row.prop(light, "use_temperature", text="")
|
||||
# Don't show color preview for now, it is grayed out so the color
|
||||
# is not accurate. Would not a change in the UI code to allow
|
||||
@@ -1531,6 +1532,7 @@ class CYCLES_LIGHT_PT_light(CyclesButtonsPanel, Panel):
|
||||
sub = row.row()
|
||||
sub.active = light.use_temperature
|
||||
sub.prop(light, "temperature", text="")
|
||||
row.prop_decorator(light, "temperature")
|
||||
|
||||
if light.use_temperature:
|
||||
col.prop(light, "color", text="Tint")
|
||||
|
||||
@@ -91,6 +91,7 @@ class DATA_PT_EEVEE_light(DataButtonsPanel, Panel):
|
||||
col = layout.column()
|
||||
heading = col.column(align=True, heading="Temperature")
|
||||
row = heading.column(align=True).row(align=True)
|
||||
row.use_property_decorate = False
|
||||
row.prop(light, "use_temperature", text="")
|
||||
# Don't show color preview for now, it is grayed out so the color
|
||||
# is not accurate. Would not a change in the UI code to allow
|
||||
@@ -104,6 +105,7 @@ class DATA_PT_EEVEE_light(DataButtonsPanel, Panel):
|
||||
sub = row.row()
|
||||
sub.active = light.use_temperature
|
||||
sub.prop(light, "temperature", text="")
|
||||
row.prop_decorator(light, "temperature")
|
||||
|
||||
if light.use_temperature:
|
||||
col.prop(light, "color", text="Tint")
|
||||
|
||||
Reference in New Issue
Block a user