Message 1 of 3
Maya Python issue

Not applicable
10-17-2012
05:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i have a class A that creates new renderLayer in maya
when user clicks create button (of class A) , a command is calling a function of the class , say funcA
now, this class A (resides in a file) in a package and is called from another class B
but with the click following error occurs
What am i missing
there is another command which works
this too has a 'self' being called. But this works
when user clicks create button (of class A) , a command is calling a function of the class , say funcA
cmds.button( label="Passes",command=("self.funcA()"))
now, this class A (resides in a file) in a package and is called from another class B
but with the click following error occurs
NameError: file <maya console> line 1: name 'self' is not defined #
What am i missing
there is another command which works
cmds.button( label=" Close ", command=("cmds.deleteUI(\"" + self.win + "\", window=True)") )
this too has a 'self' being called. But this works