Hello everyone,
I am trying to using maya command expression. but i get Error message.
please help.
Code is:
import maya.cmds as cmds
from functools import partial
class TestClass(object):
def __init__(self, *args):
pass
def testFunction(self):
print "testFunction"
def expFunction(self):
#self.testFunction() # no error
#cmds.expression( s= 'self.testFunction' ) # error: canot find
procedure "self.testFunction"
#cmds.expression( s = 'python("(self.testFunction)")') #error : name
'self' is not defined
cmds.expression( s = 'python("partial(self.testFunction)")')
#error : name 'self' is not defined
test = TestClass()
test.expFunction()
is this possible use callback testFunction using expression?
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/d33ee4c6-b5ed-41e3-9d94-d38bf1705b3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.