Replies with the current value of one environment (EEP sky) parameter. Values are scaled to match the ranges @setenv_ accepts, so a script can read a value, change it, and write it back. Reading is always allowed: neither @setenv nor RestrainedLoveNoSetEnv blocks it.
@getenv_<setting>=<channel>
Settings read from the current sky (Marine's viewer). "x ÷ 2" means the internal value divided by 2, and so on. Triplet settings reply r;g;b or x;y;z, separated by semicolons.
| Setting(s) | Reply |
|---|---|
daytime | Deprecated. -1 if no preset has been loaded through RLV this session, otherwise 1 if the sun is above the horizon and 0 if below. |
preset, asset | Name of the last preset or asset loaded via @setenv_preset/asset (empty if none) |
bluehorizon[r|g|b|i], bluedensity[r|g|b|i] | Color component ÷ 2. i = max of the three ÷ 2. No suffix = triplet. |
sunmooncolor[r|g|b|i], sunlightcolor[…] | Sunlight color ÷ 3 (same conventions) |
ambient[r|g|b|i] | Ambient color ÷ 3 |
cloudcolor[r|g|b|i] | Cloud color, unscaled |
cloud[x|y|d], clouddensity[x|y|d] | Cloud position/density 1 |
clouddetail[x|y|d] | Cloud position/density 2 |
cloudscroll[x|y] | Scroll rate − 10 (triplet form gives x;y) |
cloudcoverage, cloudscale, cloudvariance | Raw values |
hazehorizon / hazedensity | Raw / ÷ 4 |
densitymultiplier / distancemultiplier / maxaltitude | × 1000 / raw / raw |
sunglowfocus / sunglowsize | −glow.z ÷ 5 / 2 − glow.x ÷ 20 |
scenegamma | Gamma mapped back to the 0-20 @setenv_scenegamma scale |
starbrightness, moisturelevel, dropletradius, icelevel, sunscale, moonscale, moonbrightness | Raw values |
sunazim[uth], moonazim[uth] | Yaw of the sun/moon rotation, radians |
sunelev[ation], moonelev[ation] | Elevation, radians |
eastangle | eastangle;sunmoonposition, both 0-1 |
sunmoonposition | sunmoonposition;eastangle, both 0-1 |
sunimage/suntexture, moonimage/moontexture, cloudimage/cloudtexture | Texture UUIDs |
Numbers in default C++ stream formatting (up to 6 significant digits, e.g. 0.25, 1e-05). An unknown setting gives an empty reply in Marine's viewer and 0 in CoolVL.
eastangle and sunmoonposition each return two values. Marine's code notes that a sun direction can be described by two different eastangle/sunmoonposition pairs, so scripts should always read both rather than read-modify-write just one.@getenv_SunScale works.llOwnerSay("@getenv_ambient=81234"); // e.g. "0.333333;0.333333;0.333333"
llOwnerSay("@getenv_eastangle=81234"); // e.g. "0.25;0.6"
Dispatch: RRInterface.cpp 1865. getEnvironment() 4991-5226 reads LLEnvironment::instance().getCurrentSky(). The eastangle/sunmoonposition conversion uses convert_direction_to_azimuth_and_elevation() (163-300), which falls back to the last values written by @setenv in degenerate cases. The scenegamma reverse mapping is at 5068-5100.
clouddensity* or sunlightcolor* aliases. Those, and any unknown name, reply 0.eastangle or sunmoonposition for reading (the code is #if 0'd "TODO"), so they reply 0.daytime: CoolVL replies -1 when the parcel environment is in use, otherwise 1/0 from getIsSunUp(). Marine's -1 means "no RLV preset loaded".scenegamma: CoolVL replies the raw gamma, while Marine maps it back to the 0-20 @setenv scale.This command works differently from RLVa's @getenv_; see the comparison.