sorryyyyyy .. i pasted wrong one check this
*import maya.cmds as cmds
class foo():
def __init__(self):
if cmds.window("ventana", exists=1):
cmds.deleteUI("ventana", window=1)
cmds.window('ventana')
cmds.columnLayout('colLayout')
cmds.button('boton', c=lambda event:self.printAnything("Hi python"))
cmds.showWindow('ventana')
def printAnything(self,thing):
print thing
f = foo()*
2009/2/12 kurian os ™ (R)കോപ്പിയടിച്ചാല്(c)ഗോതമ്പുണ്ട! <[email protected]>
> Looking for this ??
>
>
> *import maya.cmds as cmds
>
> class foo(object):
> def __init__(self):
>
> if cmds.window("ventana", exists=1):
> cmds.deleteUI("ventana", window=1)
>
> cmds.window('ventana')
> cmds.columnLayout('colLayout')
> cmds.button('boton', c=self.printAnything("Hi python"))
> cmds.showWindow('ventana')
>
> def **printAnything**(self, **thing**):
> print thing
>
> f = foo()*
>
> On Thu, Feb 12, 2009 at 8:18 AM, Francis Vega Castillo <[email protected]
> > wrote:
>
>> Hi all!
>> I've got this code and it doesnt works. I can't pass args from button
>> command to printAnything function :S.
>> what am I doing wrong?
>>
>> Thanks!
>> ---
>>
>> *import maya.cmds as cmds
>>
>> class foo(object):
>> def __init__(self):
>>
>> if cmds.window("ventana", exists=1):
>> cmds.deleteUI("ventana", window=1)
>>
>> cmds.window('ventana')
>> cmds.columnLayout('colLayout')
>> cmds.button('boton', c=self.printAnything("Hi python"))
>> cmds.showWindow('ventana')
>>
>> def **printAnything**(self, **thing**):
>> print thing
>>
>> f = foo()*
>>
>> ---
>>
>> >>
>>
>
>
> --
> സ്നേഹിക്കയില്ല ഞാന്
> നോവുമാത്മാവിനെ സ്നേഹിച്ചിടാത്തൊരു
> തത്വശാസ്ത്രത്തെയും
>
--
സ്നേഹിക്കയില്ല ഞാന്
നോവുമാത്മാവിനെ സ്നേഹിച്ചിടാത്തൊരു
തത്വശാസ്ത്രത്തെയും
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---