remember to "define" your functions first before you "call" them

def foo(): #function definition
    pass

foo() #function call

On Tue, 2010-01-05 at 20:03 -0800, Vitor Lôbo Ramos wrote:
> Good! Thanks =D
> 
> On Jan 5, 10:09 pm, Sajeev Kandasamy <[email protected]>
> wrote:
> > Try this
> >
> > import maya.cmds as cmds
> >
> > def teste():
> >    s = cmds.sphere()
> >    return s
> >
> > def popteste(e):
> >     cmds.select(e[0])
> >     cmds.delete()
> >
> > cmds.window()
> > cmds.columnLayout( adjustableColumn=True )
> > cmds.checkBox( label='teste',align='left',
> > onc='e=teste()',ofc='popteste(e)')
> > cmds.showWindow()
> >
> > On Tue, 2010-01-05 at 14:52 -0800, Vitor Lôbo Ramos wrote:
> > > import maya.cmds as cmds
> >
> > > cmds.window()
> > > cmds.columnLayout( adjustableColumn=True )
> > > cmds.checkBox( label='teste',align='left', onc='teste()',ofc="")
> > > cmds.showWindow()
> >
> > > def teste():
> >
> > >    cmds.sphere()
> >
> > > How do I get command (ofc) to delete the sphere that I created with
> > > (onc)?
> >
> > > Thanks to anyone who can help me.
> > > --
> > >http://groups.google.com/group/python_inside_maya
> -- 
> http://groups.google.com/group/python_inside_maya


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

Reply via email to