Cool VL Viewer forum http://sldev.free.fr/forum/ |
|
Inventory Link Search & Replace http://sldev.free.fr/forum/viewtopic.php?f=9&t=1836 |
Page 1 of 1 |
Author: | Snickers [ 2018-04-19 05:49:58 ] |
Post subject: | Inventory Link Search & Replace |
One thing I've found very useful in Firestorm (and just about the only reason I ever use it) is to replace inventory links with a different item. For example, it can find all instances of links to "XYZ Red Dress" and replace them with links to "XYZ Blue Dress". Any possibility this could be added to Cool VL Viewer? I probably do this sort of thing once a week. And thanks for all the work you do Henri. |
Author: | Henri Beauchamp [ 2018-04-19 09:09:29 ] |
Post subject: | Re: Inventory Link Search & Replace |
I'm against bloat, and frankly this feature would be just that, given how few people would "need" it and how often they would use it... So, no, not on my agenda. However you could code it using Lua scripting (with MakeInventoryLink(), DeleteInventoryLink(), ListInventoryFolder() to delete and recreate the links, MakeDialog() for the UI dialog, etc). The very reason for Lua scripting in the Cool VL Viewer is precisely to add such features that do not deserve being hard-coded in the viewer C++ sources: I'd rather add new Lua functions to allow implementing such features with Lua than implementing them in C++ and bloating the viewer code as a result. |
Author: | g0rd0ngrfr33mailgr [ 2024-01-30 17:37:14 ] |
Post subject: | Re: Inventory Link Search & Replace |
Question: how do we find the inventory path of a certain item, knowing its UUID? ListInventoryFolder does the reverse. I've started thinking about this, and what I have so far is: Define: ReplaceInventoryLinks(A,B) 0. Input: A (item given by full inventory path case sensitive, with "|" used as folders separator) 0. Input: B (item given by full inventory path case sensitive, with "|" used as folders separator) 1. FindInventoryObject(A) → keep only those for which type = AT_LINK = 24 and of them only the "id" (=UUIDs) → UUIDofA (make a new array using an existing array) 2. For all i in UUIDofA, 2a. we find its inventory path (how?) → pathofi 2b. DeleteInventoryLink(pathofi|i) 2c. MakeInventoryLink(B,pathofi) Define: DeleteInventoryLinks(A) 0. Input: A (item given by full inventory path case sensitive, with "|" used as folders separator) 1. FindInventoryObject(A) → κρατᾶμε μόνον αὐτὰ γιὰ τὰ ὁποῖα type = AT_LINK = 24 καὶ κρατᾶμε μόνον τὰ "id" (=UUIDs) → UUIDofA 2. For all i in UUIDofA, 2a. we find its inventory path (how?) → pathofi 2b. DeleteInventoryLink(pathofi|i) Am I thinking correctly? |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |