diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-02-09 09:19:27 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-02-09 09:19:27 -0500 |
commit | 8e3375534607a1a6648ace18f7293a2c0a096862 (patch) | |
tree | d4c9d553491fca339759a262d6d5a4f18380059f /indra/llprimitive/lltextureanim.cpp | |
parent | 72e680cfae03aa86659b6c2165e16ce46487097b (diff) |
When LLFloaterLUADebug script returns a value, display the value.
The chunk:
return 1, 2, {}
differs in two ways from:
print(1, 2, {})
First, print() engages the Lua tostring() builtin, so it displays values as
Lua sees them. (For a table, tostring() displays "table: hex", which isn't so
wonderful.) But LLFloaterLUADebug serializes the LLSD converted from the Lua
return values.
Second, we've overridden print() to engage a function that writes to the
viewer log as well as displaying to LLFloaterLUADebug. (As we go forward, most
Lua scripts won't be run manually by LLFloaterLUADebug.) The values returned
by a Lua chunk aren't implicitly logged. Each C++ caller wanting to evaluate a
Lua expression can choose whether to log the results.
Diffstat (limited to 'indra/llprimitive/lltextureanim.cpp')
0 files changed, 0 insertions, 0 deletions