Jump to content

Is there way to retrieve the list of tags for an animation?


Recommended Posts

Not one built in, as I don't see much use for such a function. Any tag that might be relevant to what your doing with the animation can be simply checked with HasTag(), the actual list of tags should be otherwise useless.
 
But if you really need a list of all the tags, getting them isn't really that hard with a small bit of scripting. Here's a simple way to get them all into a string array.

string[] function GetTags(sslBaseAnimation Animation)
	;// Get animations StorageUtil accessors
	quest Storage = Animation.Storage
	string TagsKey = Animation.Key("Tags")
	;// Get number of tags animation has
	int i = StorageUtil.StringListCount(Storage, TagsKey)
	;// Create empty tags array sized to the number of tags there are
	string[] tags = sslUtility.StringArray(i)
	;// Loop through tags in StorageUtil and set the Nth tags element
	while i
		i -= 1
		tags[i] = StorageUtil.StringListGet(Storage, TagsKey, i)
	endWhile
	;// Return tags array containing all the animation tags pulled out of StorageUtil
	return tags
endFunction

While I don't see much use for such a function; since I essentially just wrote it here, I'll go ahead and include it in SexLab 1.40.

 

 

Link to comment

I only need it to understand SL better. I'm writing a developer-only mod that essentially taps all of the key events in SL and writes to the papyrus log relevant info, actors, animation names, tags, etc. It's not essential, but thanks for working it out for me.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use