Not sure exactly what you're trying to do... but seems like youre not
quering or passing correct arg.
There is an example one more time of a simple UI. just like guys here
mentioned before me. just complete.

import maya.cmds as mc

# window creation
def windowNAMEinvoke():
  lwin = "windowNAME"
  if mc.window(lwin,query=True,exists=True):
    mc.deleteUI(lwin , wnd=True)

  # create window
  mc.window(lwin,title="ToolWindow")
  # layout ...must have one!
  mc.columnLayout(adj=True)
  # elements
  mc.button(label="Create Locator",command="mc.spaceLocator(p=
([0,5,0]))")

  # show window
  mc.showWindow()

windowNAMEinvoke()

Good luck.
Melvin3d

On Dec 7, 12:39 pm, Vitor Lôbo Ramos <[email protected]>
wrote:
> # Result: <function lobo at 0x0D6DD8F0> #
> setFocus `paneLayout -query -pane1 viewPanes`;
>
> this means that ... Missing Something? that can be a setfocus,
> panelayout ... ?
> Well, my intention is to invoke a window out either through command.
>
> > yes. it would go something like this
>
> > import maya.cmds as cmds
> > def windowNAMEinvoke():
> >     if cmds.window("windowNAME", exists=True):
> >         cmds.deleteUI("windowNAME")
>
> > that should be correct.
>
> > Brandon L. Harris
>
> > On Dec 7, 7:25 am, Vitor Lôbo Ramos <[email protected]> wrote:
>
> > > In MEL, to invoke a window, I use the command:
> > > global proc windowNAMEinvoke (){
>
> > >     if (`window -ex "windowNAME"`)
> > >         deleteUI "windowNAME";
>
> > > would be like this in python?
>
>

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

Reply via email to