Я пишу простой инструмент для Maya, и я пытаюсь вызвать базовую функцию в другой. Но я всегда получаю: global name "baseShape" is not defined
.«глобальное имя не определено» - in maya python
Вот фрагмент моего кода с ошибкой:
class correctiveShaper():
def __init__(self):
#class variable
self.app = {}
#call on the build UI
self.buildUI()
def buildUI(self, *args):
cmds.separator(h=30)
cmds.button(label="Create Shape", w=295, h=30, al="right", c= baseShape)
def baseShape (self, *args) :
self.app["sel"]=cmds.ls(sl=True)[0]
Python не позволит мне выполнить команду c = baseShape
в def buildUI
, и я не знаю, почему.