open the inventory directly to a specific folder
Author |
Message |
Henri Beauchamp
Joined: 2009-03-17 18:42:51 Posts: 5550
|
They denote optional parameters (the brackets themselves shall not be typed). This is a totally common syntax description convention for pretty much all languages... E.g. (passing an empty 'parameter' string and omitting the 'show' boolean, meaning it will default to true):
|
2023-04-01 16:53:03 |
|
|
DonFranko
Joined: 2021-06-21 12:39:03 Posts: 143
|
Thank you !
|
2023-04-01 17:02:17 |
|
|
DonFranko
Joined: 2021-06-21 12:39:03 Posts: 143
|
Hello Henri,
I got another step forward, thank you again.
I think it's much better that not all the folders of the new root directory get expanded, esp. when the targeted folder is a root folder. Now I'm wondering if it would be possible to go directly to the sub-folder when that got called in the lua-command by its UUID. In my special use-case that targeted folder is a 4th-level-folder (root-sub1-sub2-sub3). As it is now, one have to click all folder levels to get to the desired folder. It would be great if it would be possible to expand all needed root and sub-level folders automatically if the target folder is a sub-level folder.
|
2023-04-01 17:30:14 |
|
|
Henri Beauchamp
Joined: 2009-03-17 18:42:51 Posts: 5550
|
This is already what happens, since when you change the root folder in an inventory list, that folder gets opened (but sub-folders now stay closed). Again, this is what should already been happening. But if you pass an invalid UUID, it is possible that the inventory list stays opened at the root of the inventory instead. Since the UUID may change when you reshuffle your Inventory, you might want to instead use the full path of your sub-folder, e.g.: Oh, and I added the syntax description conventions page 5 of the documentation...
|
2023-04-01 17:41:31 |
|
|
DonFranko
Joined: 2021-06-21 12:39:03 Posts: 143
|
oh.. i wasn't aware that the uuids do change when you shuffle it a bit.. good to know.. (would that also happen for e.g. Texture-UUIDs that you wanna get loaded in prims?) Thank you for the example with the Full path possibility.. that is of course a much better approach then. Fantastic!
|
2023-04-01 18:59:47 |
|
|
Henri Beauchamp
Joined: 2009-03-17 18:42:51 Posts: 5550
|
No. That UUID is the asset UUID, which is the UUID linked to the texture in SL's assets database: it is unique and never changes for a given texture. The inventory object UUID (the "object" can be either an inventory item or an inventory folder), on the other hand, is created on demand (e.g. when you copy and paste an object). For inventory items, several different items (e.g. "Texture" items) may point to the same asset (the texture asset UUID for Texture items).
|
2023-04-01 19:19:36 |
|
|
DonFranko
Joined: 2021-06-21 12:39:03 Posts: 143
|
what a pity that they have the same Short name UUID. Thank you for the detailed information. So I change the script directly to the Folder and make shure that I don't change the folder structure (too often )
|
2023-04-01 21:45:53 |
|
|
DonFranko
Joined: 2021-06-21 12:39:03 Posts: 143
|
I beg your pardon, but have another question That code opens the MUSIC folder, so I can see all other subfolders closed, as it should be. That code (I copied the title of the second one direct out of sl) shows me only the MUSIC folder collapsed and I have to click on it to see the targeted folder. From what you wrote before I should see directly the targeted folder. As of the sub3 it doesn't work at all and see the whole Inventory.. Am I doing something wrong?
|
2023-04-01 22:13:01 |
|
|
Henri Beauchamp
Joined: 2009-03-17 18:42:51 Posts: 5550
|
Yes, auto-opening does not work well over the second level sub-folders of the root inventory... This is already fixed for next release. Yes, probably: check the spelling (it is case sensitive too), and verify there is not a leading or trailing space in the "Spot On" folder name (in the inventory). You can also enable the "Lua" debug tag ("Advanced" -> "Consoles" -> "Debug tags") and open the debug console (CTRL SHIFT 4) to see what is found and what is not by the HBViewerAutomation::getInventoryObjectId method (this will be listed in the log) when you issue the "/lua SetLuaFloaterValue('inventory','inventory1','MUSIC|SHOW FAVORITES & NECESSITIES|Spot On')" command in the chat (with the inventory Lua floater already opened).
|
2023-04-01 23:17:39 |
|
|
DonFranko
Joined: 2021-06-21 12:39:03 Posts: 143
|
great! I check it again even more carefully as I already did.. haven't checked the trailing spaces... Oh.. nice. I try that..
|
2023-04-02 01:27:32 |
|
|
Who is online |
Users browsing this forum: No registered users and 36 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|