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!