Outliner Filtering

How to set a filter when creating outilner to show only the shape nodes & not the dag nodes.

shape nodes are dag nodes.. what exactly do you mean..?

my bad.

I mean show the shape node, not the transform node. For example, in case of camera filter it has to show only the shape
nodes, not the transform of camera.

I'm not sure you really want to do something like this as ignoring the scene heirarchy in the outliner can only lead to grief, but hey, I'm happy to assume you know what you're doing!

first, you need to create an item filter that only filters shapes:

string $shapeFilter = itemFilter -byType "shape";

then, you need to edit your outliner panel to use this filter:

outlinerEditor -e -showShapes true -displayMode "List" -filter $shapeFilter outlinerPanel1;

The -showShapes flag is specified so that it shows your shapes in the first place (duh!)
The -displayMode "List" tells the outliner to display everything in a flat non-heirarchical list
and the -filter flag specifies the itemfilter you previously created.

this should do exactly as you asked, but there are several other ways of tailoring the display if it's not exactly what you're after. check out the itemFilter and outlinerEditor MEL command docs for more info.

:nathaN

Thanks.....

It's working...., displayList "List" was the only flag missing.