Fix the sun in L_World and L_Gym: positional unreal.Rotator is (roll, pitch, yaw)
Both scripts passed (pitch, yaw, roll) and pitched the sun upward, so every scene rendered as night and the viewport's auto exposure sat at EV -8.5, which is what the 'cached lighting is going to be clipped' warning reports. Keyword arguments now; the gym script re-applies the rotation on an existing sun; the world script removes the old external actor folder on disk rather than through the asset library, which cannot load streaming proxies on their own. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
4025b04941
commit
d64748f76f
@@ -46,10 +46,14 @@ def ensure_floor():
|
||||
|
||||
|
||||
def ensure_daylight():
|
||||
if not find_actor("Gym_Sun"):
|
||||
sun = spawn(unreal.DirectionalLight, "Gym_Sun", unreal.Vector(0, 0, 500), unreal.Rotator(-45, 30, 0))
|
||||
sun.light_component.set_editor_property("intensity", 8.0)
|
||||
sun = find_actor("Gym_Sun")
|
||||
if not sun:
|
||||
sun = spawn(unreal.DirectionalLight, "Gym_Sun", unreal.Vector(0, 0, 500))
|
||||
sun.light_component.set_editor_property("intensity", 10.0)
|
||||
sun.light_component.set_editor_property("atmosphere_sun_light", True)
|
||||
# Always re-applied, with keyword arguments: positional unreal.Rotator is (roll, pitch, yaw), and the first
|
||||
# version of this script pitched the sun 30 degrees upward, which lit the gym as night.
|
||||
sun.set_actor_rotation(unreal.Rotator(roll=0.0, pitch=-45.0, yaw=30.0), False)
|
||||
if not find_actor("Gym_Sky"):
|
||||
spawn(unreal.SkyAtmosphere, "Gym_Sky", unreal.Vector(0, 0, 0))
|
||||
if not find_actor("Gym_SkyLight"):
|
||||
|
||||
Reference in New Issue
Block a user