Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-03-19 09:56:13



Reply to topic  [ 22 posts ]  Go to page Previous  1, 2, 3  Next
open the inventory directly to a specific folder 
Author Message

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
DonFranko wrote:
I have the documentation open, but I have not yet figured out what all the brackets mean ;)
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):
Code:
OpenLuaFloater("inventory", "", "bottom-right")


2023-04-01 16:53:03
Profile WWW

Joined: 2021-06-21 12:39:03
Posts: 137
Reply with quote
Thank you !


2023-04-01 17:02:17
Profile

Joined: 2021-06-21 12:39:03
Posts: 137
Reply with quote
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
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
DonFranko wrote:
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.
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).

Quote:
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.
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.:
Code:
SetLuaFloaterValue("inventory","inventory1","sub1|sub2|sub3")


Oh, and I added the syntax description conventions page 5 of the documentation...


2023-04-01 17:41:31
Profile WWW

Joined: 2021-06-21 12:39:03
Posts: 137
Reply with quote
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.

Quote:
Oh, and I added the syntax description conventions page 5 of the documentation...
Fantastic!


2023-04-01 18:59:47
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
DonFranko wrote:
would that also happen for e.g. Texture-UUIDs that you wanna get loaded in prims?
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
Profile WWW

Joined: 2021-06-21 12:39:03
Posts: 137
Reply with quote
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
Profile

Joined: 2021-06-21 12:39:03
Posts: 137
Reply with quote
I beg your pardon, but have another question

Code:
SideBarButton(4, "In", "OpenLuaFloater('inventory','','bottom-right');SetLuaFloaterValue('inventory','inventory1','MUSIC')", "Opens Inventory in Folder Spot On Blue Rezz Objects")
That code opens the MUSIC folder, so I can see all other subfolders closed, as it should be.

Code:
SideBarButton(4, "In", "OpenLuaFloater('inventory','','bottom-right');SetLuaFloaterValue('inventory','inventory1','MUSIC|SHOW FAVORITES & NECESSITIES')", "Opens Inventory in Folder Spot On Blue Rezz Objects")
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.

Code:
SideBarButton(4, "In", "OpenLuaFloater('inventory','','bottom-right');SetLuaFloaterValue('inventory','inventory1','MUSIC|SHOW FAVORITES & NECESSITIES|Spot On')", "Opens Inventory in Folder Spot On Blue Rezz Objects")
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
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
DonFranko wrote:
That code 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.
Yes, auto-opening does not work well over the second level sub-folders of the root inventory... This is already fixed for next release.

Quote:
Code:
SideBarButton(4, "In", "OpenLuaFloater('inventory','','bottom-right');SetLuaFloaterValue('inventory','inventory1','MUSIC|SHOW FAVORITES & NECESSITIES|Spot On')", "Opens Inventory in Folder Spot On Blue Rezz Objects")
As of the sub3 it doesn't work at all and see the whole Inventory..

Am I doing something wrong?
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
Profile WWW

Joined: 2021-06-21 12:39:03
Posts: 137
Reply with quote
Henri Beauchamp wrote:
DonFranko wrote:
That code 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.
Yes, auto-opening does not work well over the second level sub-folders of the root inventory... This is already fixed for next release.
great!

Quote:
Code:
SideBarButton(4, "In", "OpenLuaFloater('inventory','','bottom-right');SetLuaFloaterValue('inventory','inventory1','MUSIC|SHOW FAVORITES & NECESSITIES|Spot On')", "Opens Inventory in Folder Spot On Blue Rezz Objects")
As of the sub3 it doesn't work at all and see the whole Inventory..

Quote:
Am I doing something wrong?
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).
I check it again even more carefully as I already did.. haven't checked the trailing spaces...

Code:
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).
Oh.. nice. I try that..


2023-04-02 01:27:32
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 22 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 3 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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.