summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-09-04`result_view()`'s table's `close()` method need not be further wrapped.Nat Goodspeed
`LL.setdtor(desc, table, func)` eventually calls `func(table)`. So the `close()` method on the table returned by `result_view()` can be directly passed to `setdtor()`, instead of wrapped in a new anonymous function whose only job is to pass the table to it. Moreover, there's no need for the table returned by LLInventory.lua's `result()` function to lazily instantiate the `result_view()` for `categories` or `items`: neither `result_view` will fetch a slice unless asked. Just return `{categories=result_view(...), items=result_view(...), close=...}`. This dramatically simplifies the `result()` function. Since that table also defines a `close()` function, that too can be passed directly to `setdtor()` without being wrapped in a new anonymous function.
2024-09-04Instead of traversing all calling cards, pick a selected few.Nat Goodspeed
Make test_LLInventory.lua directly select from the calling_cards result set, instead of first copying all names to a separate array.
2024-09-04Merge branch 'develop' into marchcat/b-developAndrey Lihatskiy
# Conflicts: # indra/llcommon/llerror.h
2024-09-04viewer#2411 Cleanup #2Andrey Kleshchev
2024-09-04viewer#2411 CleanupAndrey Kleshchev
2024-09-04viewer#2411 A bit more coverage for font bufferAndrey Kleshchev
2024-09-04viewer#2411 LLFontGL::render optimizations #3Andrey Kleshchev
2024-09-04viewer#2411 LLFontGL::render optimizations #2Andrey Kleshchev
2024-09-04Remove usused LLButton::mBorderEnabledAndrey Kleshchev
2024-09-04viewer#2411 LLFontGL::render optimizationsAndrey Kleshchev
2024-09-03secondlife/viewer#2490: Fix PBR terrain texture transform feature flag ↵Cosmic Linden
handled by viewer in unpredictable manner
2024-09-03Use Lua result-set logic for "LLFloaterReg"s "getFloaterNames" op.Nat Goodspeed
This is the query that produced so many results that, before we lifted the infinite-loop interrupt limit, inspect(result) hit the limit and terminated.
2024-09-03#1852 Fix for some visual corruption caused by divide by zero in lighting ↵Dave Parks
functions (#2488)
2024-09-03Generalize Lua-side result-set machinery for other use cases.Nat Goodspeed
Change `result_view()` from a simple function to a callable table so we can add conventional/default functions to it: `result_view.fetch()` is a generic `fetch()` function suitable for use with `result_view()`, and `result_view.close()` is a variadic function that closes result sets for whichever keys are passed. This arises from the fact that any `LL::ResultSet` subclass is accessed generically through its base class, therefore we don't need distinct "getSlice" and "closeResult" operations for different `LLEventAPI` listeners. (It might make sense to relocate those operations to a new generic listener, but for now "LLInventory" works.) That lets `result_view()`'s caller omit the `fetch` parameter unless it requires special behavior. Omitting it uses the generic `result_view.fetch()` function. Moreover, every view returned by `result_view()` now contains a close() function that closes that view's result set. The table returned by LLInventory.lua's `result()` function has a `close()` method; that method can now call `result_view.close()` with the two keys of interest. That table's `__index()` metamethod can now leverage `result_view()`'s default `fetch` function.
2024-09-03Merge pull request #2489 from RyeMutt/fix-buffervisRye Mutt
Fix visualizing luminance buffer and small cleanup
2024-09-03Fix visualizing luminance buffer and small cleanupRye Cogtail
2024-09-03Fix a bug in ResultSet::getSliceStart().Nat Goodspeed
When asked to retrieve a slice starting at an `index > 0`, `getSliceStart()` was returning an LLSD array whose first `index` entries were `isUndefined()`, followed by the desired data. Fix to omit those undefined entries.
2024-09-03Merge pull request #2484 from secondlife/v-2483cosmic-linden
secondlife/viewer#2483: Fix label typo in PBR terrain texture transforms tab
2024-09-03Add Lua traceback to errors from calling lluau::expr().Nat Goodspeed
That includes scripts run by LLLUAmanager::runScriptFile(), runScriptLine() et al.
2024-09-03Iterate to print landmarks returned by LLInventory.Nat Goodspeed
At this point, inspect(landmarks) just returns "<userdata 1>".
2024-09-03secondlife/viewer#2483: Fix label typo in PBR terrain texture transforms tabCosmic Linden
2024-09-03test_inv_resultset.lua exercises LLInventory's result-set functionality.Nat Goodspeed
2024-09-03result_view() now reuses same metatable instance for every table.Nat Goodspeed
2024-09-03Break out llinventorylistener.cpp's InvResultSet as LL::ResultSet.Nat Goodspeed
We may well want to leverage that API for additional queries that could potentially return large datasets.
2024-09-03Add test_result_view.lua; fix minor bugs in result_view.lua.Nat Goodspeed
2024-09-03In lua_what() and lua_stack(), try to report a function's name.Nat Goodspeed
2024-09-03Add the RLVa consoleKitty Barnett
2024-09-03viewer#2311 Message about oversized snapshots wasn't shown in some casesAndrey Kleshchev
2024-09-03viewer#2310 Fix snapshot's size string dropping color during uploadAndrey Kleshchev
2024-09-03#2403 Reset Skeleton issuesAlexander Gavriliuk
2024-09-03#2471 The Destinations ComboBox on Login Screen changes the selected item to ↵Alexander Gavriliuk
the similar one
2024-09-02Introduce result_view.lua, and use it in LLInventory.lua.Nat Goodspeed
result_view(key_length, fetch) returns a virtual view of a potentially-large C++ result set. Given the result-set key, its total length and a function fetch(key, start) => (slice, adjusted start), the read-only table returned by result_view() manages indexed access and table iteration over the entire result set, fetching a slice at a time as required. Change LLInventory to use result_view() instead of only ever fetching the first slice of a result set. TODO: This depends on the viewer's "LLInventory" listener returning the total result set length as well as the result set key. It does not yet return the length.
2024-09-02More styling fixes and other minor inconsistency fixes in ↵TJ
inventorymodelbackgroundfetch code. (#2476)
2024-09-02Make `pairs()`, `ipairs()` forward to original funcs if no metamethods.Nat Goodspeed
That is, our replacement `pairs()` forwards the call to built-in `pairs()` when the passed object has no `__iter()` metamethod. Similarly, our replacement `ipairs()` forwards to built-in `ipairs()` when the passed object has no `__index()` metamethod. This allows for the possibility that the built-in `pairs()` and `ipairs()` functions engage more efficient implementations than the obvious ones.
2024-09-02Add the @getcommand command query reply commandKitty Barnett
2024-09-02Add basic scaffolding to support reply commands and handle @versionXXX as an ↵Kitty Barnett
illustration
2024-09-01Restore old error handling early out logic in LLAppViewer::init() (#2475)Brad Linden
fixes secondlife/viewer#2474
2024-09-01Add owner say chat hookKitty Barnett
2024-08-31Minimal code needed to add RLVa with an on/off toggleKitty Barnett
2024-08-31Make global pairs(), ipairs() honor metamethods.Nat Goodspeed
Specifically, make pairs(obj) honor obj's __iter() metamethod if any. Make ipairs(obj) honor obj's __index() metamethod, if any. Given the semantics of the __index() metamethod, though, this only works for a proxy table if the proxy has no array entries (int keys) of its own.
2024-08-31Give certain LLInventory queries an API based on result sets.Nat Goodspeed
Introduce abstract base class InvResultSet, derived from LLIntTracker so each instance has a unique int key. InvResultSet supports virtual getLength() and getSlice() operations. getSlice() returns an LLSD array limited to MAX_ITEM_LIMIT result set entries. It permits retrieving a "slice" of the contained result set starting at an arbitrary index. A sequence of getSlice() calls can eventually retrieve a whole result set. InvResultSet has subclasses CatResultSet containing cat_array_t, and ItemResultSet containing item_array_t. Each implements a virtual method that produces an LLSD map from a single array item. Make LLInventoryListener::getItemsInfo(), getDirectDescendants() and collectDescendantsIf() instantiate heap CatResultSet and ItemResultSet objects containing the resultant LLPointer arrays, and return their int keys for categories and items. Add LLInventoryListener::getSlice() and closeResult() methods that accept the int keys of result sets. getSlice() returns the requested LLSD array to its caller, while closeResult() is fire-and-forget. Because bulk data transfer is now performed by getSlice() rather than by collectDescendantsIf(), change the latter's "limit" default to unlimited. Allow the C++ code to collect an arbitrary number of LLPointer array entries, as long as getSlice() limits retrieval overhead. Spell "descendants" correctly, unlike the "descendents" spelling embedded in the rest of the viewer... sigh. Make the Lua module provide both spellings. Make MAX_ITEM_LIMIT a U32 instead of F32. In LLInventory.lua, store int result set keys from 'getItemsInfo', 'getDirectDescendants' and 'collectDescendantsIf' in a table with a close() function. The close() function invokes 'closeResult' with the bound int keys. Give that table an __index() metamethod that recognizes only 'categories' and 'items' keys: anything else returns nil. For either of the recognized keys, call 'getSlice' with the corresponding result set key to retrieve (the initial slice of) the actual result set. Cache that result. Lazy retrieval means that if the caller only cares about categories, or only about items, the other result set need never be retrieved at all. This is a first step: like the previous code, it still retrieves only up to the first 100 result set entries. But the C++ code now supports retrieval of additional slices, so extending result set retrieval is mostly Lua work. Finally, wrap the table-with-metamethod in an LL.setdtor() proxy whose destructor calls its close() method to tell LLInventoryListener to destroy the CatResultSet and ItemResultSet with the bound keys.
2024-08-30Add LLIntTracker<T>, an LLInstanceTracker<T, int> with generated keys.Nat Goodspeed
The point of LLIntTracker is to generate its keys implicitly, so that its int getKey() can be treated more or less like an instance pointer, with the added bonus that the key can be passed around via LLSD. LLIntTracker generates random int keys to try to make it a little harder for one script to mess with an LLIntTracker instance belonging to another.
2024-08-30Change LLInstanceTracker::destruct() to erase().Nat Goodspeed
One could argue that LLInstanceTracker is a container of sorts, and erase() is more conventional. This affects no other code, as destruct() is not currently referenced.
2024-08-30Introduce Khronos Neutral tonemapper as new default along with debug options ↵Rye Mutt
to control tonemap mix (#2464) (#2468)
2024-08-30Merge pull request #2470 from secondlife/lua-play-animMaxim Nikolenko
Add Lua api to start/stop playing animation
2024-08-30Merge pull request #2472 from secondlife/v-2448cosmic-linden
secondlife/viewer#2448: Fix crash rendering rigged PBR prims
2024-08-30secondlife/viewer#2448: Fix crash rendering rigged PBR primsCosmic Linden
2024-08-30Fix background folder fetch pushing requests to wrong queue (#2436)Ansariel Hiller
2024-08-30update OpenJPEG 2.5.2 (#2452)AiraYumi
2024-08-30#2454 Scrolling by the mouse wheel does not scroll up on the unopened ↵Alexander Gavriliuk
Destination field