Jump to content

Organising poses in folders?


Tomko Galicia
 Share

You are about to reply to a thread that has been inactive for 3964 days.

Please take a moment to consider if this thread is worth bumping.

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.

Link to comment
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®

Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3964 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...