本文整理汇总了Python中pymel.internal.pmcmds.editorTemplate函数的典型用法代码示例。如果您正苦于以下问题:Python editorTemplate函数的具体用法?Python editorTemplate怎么用?Python editorTemplate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了editorTemplate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: callCustom
def callCustom(self, newFunc, replaceFunc, *attrs):
#cmds.editorTemplate(callCustom=( (newFunc, replaceFunc) + attrs))
import pymel.tools.py2mel
if hasattr(newFunc, '__call__'):
name = self.__class__.__name__ + '_callCustom_newFunc_' + '_'.join(attrs)
newFunc = pymel.tools.py2mel.py2melProc(newFunc, procName=name, argTypes=['string'] * len(attrs))
if hasattr(replaceFunc, '__call__'):
name = self.__class__.__name__ + '_callCustom_replaceFunc_' + '_'.join(attrs)
replaceFunc = pymel.tools.py2mel.py2melProc(replaceFunc, procName=name, argTypes=['string'] * len(attrs))
args = (newFunc, replaceFunc) + attrs
cmds.editorTemplate(callCustom=1, *args)
示例2: addControl
def addControl(self, control, label=None, changeCommand=None, annotation=None, preventOverride=False, dynamic=False):
args = [control]
kwargs = {'preventOverride': preventOverride}
if dynamic:
kwargs['addDynamicControl'] = True
else:
kwargs['addControl'] = True
if changeCommand:
if hasattr(changeCommand, '__call__'):
import pymel.tools.py2mel
name = self.__class__.__name__ + '_callCustom_changeCommand_' + control
changeCommand = pymel.tools.py2mel.py2melProc(changeCommand, procName=name, argTypes=['string'])
args.append(changeCommand)
if label:
kwargs['label'] = label
if annotation:
kwargs['annotation'] = annotation
cmds.editorTemplate(*args, **kwargs)
示例3: addExtraControls
def addExtraControls(self, label=None):
kwargs = {}
if label:
kwargs['extraControlsLabel'] = label
cmds.editorTemplate(addExtraControls=True, **kwargs)
示例4: addComponents
def addComponents(self):
cmds.editorTemplate(addComponents=True)
示例5: addSeparator
def addSeparator(self):
cmds.editorTemplate(addSeparator=True)
示例6: interruptOptimize
def interruptOptimize(self):
cmds.editorTemplate(interruptOptimize=True)
示例7: endNoOptimize
def endNoOptimize(self):
cmds.editorTemplate(endNoOptimize=True)
示例8: beginNoOptimize
def beginNoOptimize(self):
cmds.editorTemplate(beginNoOptimize=True)
示例9: endScrollLayout
def endScrollLayout(self):
cmds.editorTemplate(endScrollLayout=True)
示例10: beginScrollLayout
def beginScrollLayout(self):
cmds.editorTemplate(beginScrollLayout=True)
示例11: beginLayout
def beginLayout(self, name, collapse=True):
cmds.editorTemplate(beginLayout=name, collapse=collapse)
示例12: dimControl
def dimControl(self, nodeName, control, state):
#nodeName = nodeName if nodeName else self.nodeName
# print "dim", nodeName
cmds.editorTemplate(dimControl=(nodeName, control, state))
示例13: suppress
def suppress(self, control):
cmds.editorTemplate(suppress=control)
示例14: controlLabel
def controlLabel(cls, nodeName, control):
return cmds.editorTemplate(queryLabel=(nodeName, control))
示例15: controlValue
def controlValue(cls, nodeName, control):
return cmds.editorTemplate(queryControl=(nodeName, control))