View Full Version : [py] show Polygons only in viewport

08 August 2012, 02:17 PM

I am trying to do show Polygons only from the show menu inside the viewport.
But I can't find a proper command,
I got it working using this - filtered on polys only.

mc.modelEditor (viewport, edit=True, vs=1)

but due to our pipeline this doesn't work, so what I need is not a isolate selected but rather a show polygons only.

anyone a Idea how to access this menu entries?


08 August 2012, 03:21 PM
the modelEditor command has several different flags to turn on/off the display of all those various node types, for example:
mc.modelEditor(viewport, e=1, polyMeshes=1)you can also turn all objects off using the -alo -allObjects flag. doesn't turning "Echo All Commands" on in the script editor help here?

08 August 2012, 03:34 PM
ok, aparently I tried last time with echo all commands and didn't got feedback.
but yeah, it works now.
thanks anyway for pointing me out!

08 August 2012, 11:41 PM
You can get a list of all the modelEditor keywords with the current viewport state like this (with python)...

pm.modelEditor('modelPanel4', q=True, sts=True)

but as you will discover, this is one of those cases where maya reveals its mel origins... and so doing it in mel formats the result better (with mel)...

modelEditor -q -sts "modelPanel4";


CGTalk Moderation
08 August 2012, 11:41 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.