Nishita sky: Increase elevation range
The Nishita sky texture currently only allows moving the sun to the zenith. The problem is if you want to animate the passing of a full night-day-night cycle. Currently it's not easy to do due to this limitation. The patch makes it so users can easily animate the sun moving from sunrise to sunset by expanding the max sun elevation to go 360° instead of 90°. Reviewed By: fclem Differential Revision: https://developer.blender.org/D13724
This commit is contained in:
@@ -5282,7 +5282,7 @@ static void def_sh_tex_sky(StructRNA *srna)
|
||||
|
||||
prop = RNA_def_property(srna, "sun_elevation", PROP_FLOAT, PROP_ANGLE);
|
||||
RNA_def_property_ui_text(prop, "Sun Elevation", "Sun angle from horizon");
|
||||
RNA_def_property_range(prop, -M_PI_2, M_PI_2);
|
||||
RNA_def_property_ui_range(prop, -M_PI, M_PI, 1, 2);
|
||||
RNA_def_property_float_default(prop, M_PI_2);
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
|
Reference in New Issue
Block a user