View Full Version : MEL to control the show options in the outliner.

07 July 2007, 11:06 AM
Hi all,

I'm trying to make a tool which i have a set of buttons that corrispond to different outliner elements. Ie geo/bakesets/lights. Basically a scene manager with presets. I've got it working for the viewport... showing/hiding groups but i'd like to get this linked into the outliner as well to only show the currently activated objects.

I want to be able to hide/show these in the outliner (like is avalible in the show>objects menu). But there doesn't seem to be any MEL command to control this. I've looked in the maya help, in a few books and on the internet but no where seems to have any reference to this fuctionality.

Also when i echo all it doesn't return anything other than the menu/window commands...

editMenuUpdate MayaWindow|mainEditMenu;
filterUIShowFilterMenu outlinerPanel1 outlinerPanel1Window|TearOffPane|outlinerPanel1|menu36;
// Result: 1 //
filterUIShowFilterMenu outlinerPanel1 outlinerPanel1Window|TearOffPane|outlinerPanel1|menu36;
// Result: 1 //
filterUIShowObjectFilterMenu outlinerPanel1 outlinerPanel1Window|TearOffPane|outlinerPanel1|menu36|FilterUIObjectFilterSubMenu;
// Result: 1 //
filterUIHandleObjectFilterMenuItem outlinerPanel1 outlinerPanel1Window|TearOffPane|outlinerPanel1|menu36|FilterUIObjectFilterSubMenu outlinerPanel1Window|TearOffPane|outlinerPanel1|menu36|FilterUIObjectFilterSubMenu|menuItem642 DefaultGeometryFilter;
scriptJob -lc;

none of which is any good...

any ideas?


07 July 2007, 08:13 PM
I spent a little time looking into this because I've wanted to figure out how to drive the outliner for other reasons. Unfortunately I can't spend anymore time on this today, but here's what I've learned.

Some outliner functions can be controlled with the 'outlinerEditor' command. You can use 'help outlinerEditor' to see the list of options. You can control some of the outliner display via this command e.g. 'outlinerEditor -e -showShapes 1 outlinerPanel1' to turn on/off shape display and 'outlinerEditor -e -showDagOnly 1 outlinerPanel1' to turn on/off display of DG nodes. 'outlinerPanel1' seems to always be the name of my outliner, but there's probably a script way of finding it (and that would be preferable to hardcoding it).

However, the Show->Objects menu seems to be more complicated. It looks like this is controlled by the code in '\Program Files\Alias\Maya8.0\scripts\others\filterUI.mel'. Can't be sure though.

There's a debugging interface for the filter UI that's created by a call to 'filterUIDebugCreateWindow()'. You'll have to make this proc global (along with the callbacks filterUIDebugPrintViewInfo(), filterUIDebugPrintFilterInfo(), filterUIDebugPrintFilters(), filterUIDebugPrintFilterStats(), and filterUIDebugClearViewInfo()) and then calling filterUIDebugCreateWindow(). I can see the debug window changing the numbers of filters when you change the selection in Show->Objects, so it looks like this code is in the right area at least.

That's about as far as I got. Hope this is helpful.

--- David

CGTalk Moderation
07 July 2007, 08:13 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.