Im having some difficulty grasping the itemFilter and lsThroughFilter commands. I need to create a filter that will list all the items in the scene that conain a specific attribute. (a Custom attribute I'm generating) I'm guessing the itemFilter is the best way to achieve quick results. What is the benifit of an itemFilter? what exactly do I need to include in a filter script?
I understand how itemFilter works, but I haven't been able to get itemFilterAttr to work (which I think is the one you need).
Basically, you create an objectFilter node when you execute itemFilter (don't ask why their names are different).
as follows:
mel: itemFilter -byName "lambert" this creates an objectFilter //result objectFilter7// or something like that.
then you can do:
mel: lsThroughFilter "objectFilter7"
and it should return a long list of all nodes containing 'lambert' anywhere in their names.
Now, there is another such thing for ATTRIBUTES which is k nown as an objectAttrFilter but I still can't get it to work.. it's accessible via the itemFilterAttr command.. yes I know they're all jumbled up.. I'm presently searching through all the maya scripts on my hard drive and not one makes use of this command that I can find.
Please keep posting, I am eager to see the resolution of your query. .hope this little bit helps.
Thats because item filter by attribute isnt what you expect it to be. IT is to filter a list of attributes. NOT filttyer ojects with attributes so even if youd get it to work it wouldnt realy return what you expet since youd get the names of your custom atributes.
What you instead want is a filter by script in itemFilter.