Jump to content
Sign in to follow this  
Tomko Galicia

Organising poses in folders?

Recommended Posts

I'm still new to scripting but I've built a HUD and pose stand that lets you cycle through all the poses in Contents. However, I want to divide these poses into catagories and organise them in folders. To make things simple, lets say Male and Female.

 

I have buttons on the HUD planned to cycle through these catagories, then buttons to cycle through the poses inside the catagories. I'm using llGetInventoryName at the moment so what ever I put into the pose stand works. Will I have to change this to lists and list the animations from inside the script or is there a way to get  llGetInventoryName to look in folders?

 

Can anyone point me in the right direction as how I could acieve this?

Thanks.

Share this post


Link to post
Share on other sites

Prims can't have folders so the problem won't arise ...

You may want to look at a naming convention so your script can distinguish male from female - say by prefixing the names with 'M' or 'F'.  Alternatively store them in separate linked prims.

 

Edit: waves back to Rolig - not quite back properly yet, but getting close®

Share this post


Link to post
Share on other sites

I recommend doing as suggested above.

Rather than looping through the inventory each time, you can cache the values in two lists. When you get an on_rez()/state_entry(), loop through all animations and store them in each list, depending on the prefix.

When you get a changed() with CHANGED_INVENTORY, clear the lists and cache them again.

I assume you've got some sort of pagination working based on looping through inventory count. you can do the same except with your cached lists.

Share this post


Link to post
Share on other sites

Keeping them in seperate prims mights work! 

Not sure I've ever actually tested, but I've always assumed that llStartAnimation() can only use the animations in the inventory of the same prim as the script (ignoring built-in system animations). If that's right, then animations in separate prims would require an animation script in each of those prims, all with PERMISSION_TRIGGER_ANIMATION, and one special script that orchestrates the others.

  • Like 1

Share this post


Link to post
Share on other sites

You're not only correct in that assumption, there is another complicating factor in using different prims to store animations: Each prim can only access its own inventory. That would entail the script in each needing to communicate with the main HUD program with what it has, as well as managing updates on their individual CHANGED_INVENTORY events.

 

Much better, IMO, is the original suggestion of prefixing the names with 'M' or 'F' (and possibly 'U' for unisex?) and sorting the animations into lists. That hierarchy could be further extended by using the second letter to designate sitting, standing, walking, dancing etc.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...