cmds.getPanel(withFocus=1)

On Thu, Aug 20, 2009 at 11:08 AM, Paul Molodowitch <[email protected]>wrote:

>
> I don't know of a single command, but this should work:
>
> modelPanels = []
> for panel in lsUI(panels=True):
>        if modelPanel(panel, q=1, exists=1):
>                modelPanels.append(panel)
>
> There's also a way to get the name of the currently selected modeling
> panel, too, if that's all you want... used that before in a script,
> but don't remember offhand.   I can find it if you want...
>
> - Paul
>
> On Thu, Aug 20, 2009 at 10:41 AM, Chad Vernon<[email protected]> wrote:
> > I'd like to toggle xray mode in a viewport:
> >
> > cmds.modelEditor('modelPanel1', edit=True,
> displayAppearance='smoothShaded',
> > xray=True)
> >
> > But I don't necessarily know the name of the modelPanel.  Is there a
> command
> > to list all the modelPanels in the UI?
> >
> > Thanks,
> > Chad
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to