itemFilter and lsThroughFilter

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?

Mike

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.

-Alex

exactly the same problem here,i can't get itemfilterAttr to work.
and the doc is shit on this

i dunno what -nodeArray means,does this mean input ?

CODE
if (!itemFilterAttr -q -exists hj\_animAttrFilter)
        itemFilterAttr -e -keyable 1 -hasCurve 1 hj_animAttrFilter;
    else print "itemFilterAttr hj_animAttrFilter already exists...\n";

//$hj_masterNodes is a string array containing my nodes need to pass the filter
//for some reason , i don't wanna select the nodes
//should it be this

    $hj_animAttrs=lsThroughFilter -nodeArray $hj\_masterNodes hj\_animAttrFilter;

//or this

       $hj_animAttrs=lsThroughFilter hj\_animAttrFilter -nodeArray $hj\_masterNodes;

i tried both of them,but neither works,i searched this in google and find mel open wiki and finally here.
so have u figured it out now?

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.

PS yes it defnitely is the former of the 2