...or, I can make my minions do my evil bidding for me!

*Throws his minions a goldfish snack...*

- Paul

On Thu, Aug 20, 2009 at 11:35 AM, Richard Kazuo<[email protected]> wrote:
> I think this is the command to get the current active panel. :)
>
> import maya.cmds as cmds
> cmds.getPanel(wf=1)
>
>
> Richard
>
>
>
> On Thu, Aug 20, 2009 at 3:08 PM, 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