本文整理汇总了Python中maya.cmds.symbolButton函数的典型用法代码示例。如果您正苦于以下问题:Python symbolButton函数的具体用法?Python symbolButton怎么用?Python symbolButton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了symbolButton函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: refreshAnimationModuleList
def refreshAnimationModuleList(self, index=1):
cmds.textScrollList(self.UIElements["animationModule_textScroll"], edit=True, removeAll=True)
cmds.symbolButton(self.UIElements["deleteModuleButton"], edit=True, enable=False)
cmds.symbolButton(self.UIElements["duplicateModuleButton"], edit=True, enable=False)
selectedBlprnModule = cmds.textScrollList(self.UIElements["blueprintModule_textScroll"], q=True, selectItem=True)
self.selectedBlueprintModule = self.blueprintModules[selectedBlprnModule[0]]
self.setupActiveModuleControls()
cmds.namespace(setNamespace=self.selectedBlueprintModule)
controlModuleNamespaces = cmds.namespaceInfo(listOnlyNamespaces=True)
cmds.namespace(setNamespace=":")
if controlModuleNamespaces != None:
for module in controlModuleNamespaces:
moduleName = utils.stripAllNamespaces(module)[1]
cmds.textScrollList(self.UIElements["animationModule_textScroll"], edit=True, append=moduleName)
cmds.textScrollList(self.UIElements["animationModule_textScroll"], edit=True, selectIndexedItem = index)
cmds.symbolButton(self.UIElements["deleteModuleButton"], edit=True, enable=True)
cmds.symbolButton(self.UIElements["duplicateModuleButton"], edit=True, enable=True)
cmds.symbolButton(self.UIElements["zeroModulesButton"], edit=True, enable=True)
self.setupModuleSpecificControls()
self.previousBlueprintListEntry = selectedBlprnModule
开发者ID:griffinanimator,项目名称:MPR,代码行数:28,代码来源:animation_UI.py
示例2: stabilizer
def stabilizer ():
global _camera_
_point = cmds.ls (selection = True)
if cmds.objExists ('stabilizator_expression') == False and len(_point) > 0:
_camera_ = Camera()
_point = _point[0]
if (cmds.nodeType (_point) == 'mesh' or cmds.nodeType (_point) == 'transform') and _camera_.transform != 'empty':
_expression = r'''
$pos=`python "fmmu.get_normalized_screen_position(\"''' + _point + r'''\")"`;
setAttr "''' + _camera_.shape + r'''.horizontalFilmOffset" $pos[2];
setAttr "''' + _camera_.shape + r'''.verticalFilmOffset" $pos[3];'''
print "=================================="
print _expression
cmds.expression (name = 'stabilizator_expression', string = _expression)
cmds.frameLayout ('adjustCam_frml', edit = True, visible = True)
cmds.symbolButton ('button_stabilizer', edit = True, image = 'ford_matchMoveUtilities__deStabilize.xpm', annotation = 'deStabilizer')
cmds.floatField ('field_overscan', edit = True, value = _camera_.overscan)
else:
if cmds.objExists ('stabilizator_expression') == True:
cmds.delete ('stabilizator_expression')
cmds.symbolButton ('button_stabilizer', edit = True, image = 'ford_matchMoveUtilities__stabilize.xpm', annotation = 'deStabilizer')
cmds.frameLayout ('adjustCam_frml', edit = True, collapse = True, visible = False)
try:
_camera_.reset_camera()
except:
pass
开发者ID:danielforgacs,项目名称:code-dump,代码行数:32,代码来源:ford_matchMoveUtils_v0.5.3.py
示例3: visCntrls
def visCntrls(curParent):
'''
Different visibility controls for character.
'''
imgDef = lambda x: os.path.join( iconPath, x )
visRC = cmds.rowColumnLayout( nc=5, cw=[[1,60],[2,60],[3,60],[4,60],[5,60]], parent=curParent)
cmds.symbolButton( image=imgDef( 'outliner.xpm' ), w=60, h=45 )
cmds.symbolButton( image=imgDef( 'mainRig.xpm' ), w=60, h=45 )
jointVis = cmds.symbolCheckBox(image=imgDef("JointVis_On.xpm"), w=60, h=45,
oni=imgDef("JointVis_On.xpm") ,
ofi=imgDef("JointVis_Off.xpm") )
# cmds.connectControl( jointVis, "rig.v")
ctrlVis = cmds.symbolCheckBox(image=imgDef("ctrlVis_On.xpm"), w=60, h=45,
oni=imgDef("ctrlVis_On.xpm") ,
ofi=imgDef("ctrlVis_Off.xpm") )
cmds.symbolCheckBox(image=imgDef("keySel_on.xpm"), w=60, h=45,
oni=imgDef("keySel_on.xpm") ,
ofi=imgDef("keySel_off.xpm") )
# cmds.connectControl( ctrlVis, "move_all_control.visibility")
# Row and High Rez
# Dress
# Face Controls
# T-Pose
cmds.setParent(curParent)
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:34,代码来源:mecCharGUIGen.py
示例4: mainModule
def mainModule(self):
cmds.rowColumnLayout(nc=2,cw =[(1,130),(2,285)]) #etchedOut rowlumnLayout.str#
cmds.frameLayout(label=self.moduleLabel,mw =1 ,mh =3,bs="etchedOut",cl= 0,cll=0 ,h=self.hgt)
cmds.symbolButton(h= 80,image= 'sphere.png' )
#cmds.rowColumnLayout( numberOfRows=1 ) #Side rowlumnLayout.str#
#cmds.setParent('..') #Side rowlumnLayout.end#
cmds.setParent('..') #etchedOut rowlumnLayout.end#
cmds.frameLayout(label='options:',mw =1 ,mh =3,bs="etchedOut",cl= 0,cll=0 ,h= self.hgt)
#optionsForm = cmds.formLayout()
cmds.rowColumnLayout(nc=5,cw =[(1,50),(2,50),(3,50),(4,50),(5,50)])
cmds.text(l='joint:')
cmds.text(l='fingers:')
cmds.text(l='no:')
cmds.text(l='segment:')
cmds.text(l='symmetry:')
cmds.textField()
cmds.checkBox(l ="" )
cmds.textField()
cmds.textField()
cmds.checkBox(l ="" )
#cmds.formLayout(optionsForm ,e=1,)
cmds.setParent('..')
cmds.rowColumnLayout( numberOfRows=1 )#Side: .str
cmds.text(l=' Side: ')
cmds.radioButtonGrp(nrb=2 ,la2=["L","R"] ,cw2=[30 ,30],sl =1)
cmds.scrollField(wordWrap =1,text ="creates arm skeleton template setup. ideal use: any arm Humans, Insects.." ,editable= 0,h=80,w=180)
cmds.setParent('..')##Side: .end
cmds.setParent('..')
cmds.setParent('..')
cmds.separator(height =3 ,style= "none" )
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:34,代码来源:Ui.py
示例5: _addTab
def _addTab(self, name):
'''
Adds an additional tab to the system.
'''
# Make sure that a tab exists!
# scroll = cmds.scrollLayout( h=450, parent=self.mainTab )
col = cmds.columnLayout(parent=self.mainTab)
frm = cmds.formLayout( w=450 )
path = os.path.split(__file__)[0]
fullPath = lambda x : os.path.join( path, "icons", x )
btn1 = cmds.symbolButton( image=fullPath('plus_16b.xpm'), h=20,
command=Callback(self.addFramePrompt)) # self._attrGUI )
btn2 = cmds.symbolButton( image=fullPath('delete_16b.xpm'), h=20,
command=Callback(self._removeTab ))#command=self._removeAttrs )
btn3 = cmds.symbolButton( image=fullPath('save_16.xpm'), h=20,
command=Callback(self._saveTab)) # self._attrGUI )
txt = cmds.text( l="" )
cmds.formLayout( frm, e=1, af=[[btn1, "top", 5],[btn1, "left", 5], [btn2, "top", 5],[btn3, "top", 5], [txt, "top", 5], [txt, "right", 0]],
ac=[[btn2, "left", 0, btn1],[btn3, "left", 0, btn2]])
cmds.setParent( col )
# frm = cmds.formLayout( parent=self.mainTab, w=300, h=300 )
cmds.tabLayout( self.mainTab, e=1, tl=[col, name])
self.tabs[col] = []
self.tabNames.append(col)
return col
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:34,代码来源:attr.py
示例6: updateLine
def updateLine(self, nodeName, metadata, index):
# Attribute controls will be created with the current metadata content
result = metadata.split(' ', 2 )
result += [""] * (3-len(result))
# Attribute Name
attrNameText = cmds.textField("MtoA_exrMAttributeName", text=result[1])
cmds.textField(attrNameText, edit=True, changeCommand=pm.Callback(self.changeAttrName, nodeName, attrNameText, index))
# Attribute Type
menu = cmds.optionMenu("MtoA_exrMAttributeType")
cmds.menuItem( label='INT', data=0)
cmds.menuItem( label='FLOAT', data=1)
cmds.menuItem( label='POINT2', data=2)
cmds.menuItem( label='MATRIX', data=3)
cmds.menuItem( label='STRING', data=4)
if result[0] == 'INT':
cmds.optionMenu(menu, edit=True, select=1)
elif result[0] == 'FLOAT':
cmds.optionMenu(menu, edit=True, select=2)
elif result[0] == 'POINT2':
cmds.optionMenu(menu, edit=True, select=3)
elif result[0] == 'MATRIX':
cmds.optionMenu(menu, edit=True, select=4)
elif result[0] == 'STRING':
cmds.optionMenu(menu, edit=True, select=5)
cmds.optionMenu(menu, edit=True, changeCommand=pm.Callback(self.changeAttrType, nodeName, menu, index))
# Attribute Value
attrValueText = cmds.textField("MtoA_exrMAttributeValue", text=result[2])
cmds.textField(attrValueText, edit=True, changeCommand=pm.Callback(self.changeAttrValue, nodeName, attrValueText, index))
# Remove button
cmds.symbolButton(image="SP_TrashIcon.png", command=pm.Callback(self.removeAttribute, nodeName, index))
开发者ID:Quazo,项目名称:breakingpoint,代码行数:34,代码来源:customShapeAttributes.py
示例7: ArnoldGpuCacheTemplateReplace
def ArnoldGpuCacheTemplateReplace(plugName) :
AttrName = plugName.split('.')[-1]
cmds.connectControl('GpuCache%sPath'%AttrName,plugName,fileName=True )
cmds.textField( 'GpuCache%sPath'%AttrName, edit=True, changeCommand=lambda *args: ArnoldGpuCacheEdit(plugName, *args))
cmds.textField( 'GpuCache%sPath'%AttrName, edit=True, text=cmds.getAttr(plugName) )
cmds.symbolButton('GpuCache%sPathButton'%AttrName, edit=True, command=lambda *args: LoadGpuCacheButtonPush(plugName))
开发者ID:BlueBolt,项目名称:bb_gpuCacheTranslator,代码行数:8,代码来源:gpuCacheTemplate.py
示例8: updateIconList
def updateIconList(self):
for i, sb in enumerate(self.symbolButtons):
if i >= len(self.resList[self.iconsOffset:self.numIcons + self.iconsOffset]):
cmds.symbolButton(sb, edit=True, image='', command='',
annotation='', visible=False)
else:
r = self.resList[self.iconsOffset:self.numIcons + self.iconsOffset][i]
cmds.symbolButton(sb, edit=True, image=r, annotation=r, visible=True,
command=partial(self.setCurrent_iconList, r))
开发者ID:ewerybody,项目名称:melDrop,代码行数:9,代码来源:resourceBrowser.py
示例9: toggleL2F
def toggleL2F(opt):
if opt==True:
mc.checkBox('EnableAbsRenderFolder',e=1,v=0)
mc.textField('absoluteFolder',e=1,en=0)
mc.symbolButton('absFolderButton',e=1,en=0)
if opt==False:
mc.checkBox('EnableAbsRenderFolder',e=1,v=1)
mc.textField('absoluteFolder',e=1,en=1)
mc.symbolButton('absFolderButton',e=1,en=1)
开发者ID:RobRuckus,项目名称:rcTools,代码行数:9,代码来源:rcFileManager.py
示例10: ArnoldVolumeTemplateDsoReplace
def ArnoldVolumeTemplateDsoReplace(plugName):
cmds.textField("arnoldVolumeDsoPath", edit=True, changeCommand=lambda *args: ArnoldVolumeDsoEdit(plugName, *args))
cmds.textField("arnoldVolumeDsoPath", edit=True, text=cmds.getAttr(plugName))
cmds.symbolButton(
"arnoldVolumeDsoPathButton",
edit=True,
image="navButtonBrowse.png",
command=lambda *args: LoadVolumeDsoButtonPush(plugName),
)
开发者ID:Quazo,项目名称:breakingpoint,代码行数:9,代码来源:aiVolumeTemplate.py
示例11: toggle_btn
def toggle_btn(self, *args):
if self.state:
cmds.symbolButton(self.btn, e=1, bgc=[0, 1, 0])
cmds.text(self.text, e=1, bgc=[0, 1, 0])
self.state = False
print '%s: State True' % self.label
else:
cmds.symbolButton(self.btn, e=1, bgc=[1, 0, 0])
cmds.text(self.text, e=1, bgc=[1, 0, 0])
self.state = True
print '%s: State False' % self.label
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:12,代码来源:prm_face_rig.py
示例12: createArnoldLogSettings
def createArnoldLogSettings():
pm.setUITemplate("attributeEditorTemplate", pushTemplate=True)
pm.columnLayout(adjustableColumn=True)
logToFile = cmds.getAttr("defaultArnoldRenderOptions.log_to_file")
logToConsole = cmds.getAttr("defaultArnoldRenderOptions.log_to_console")
pm.attrControlGrp(
"log_verbosity",
label="Verbosity Level",
enable=logToConsole,
attribute="defaultArnoldRenderOptions.log_verbosity",
)
pm.checkBoxGrp("log_to_console", label="Console", changeCommand=ChangeLogToConsole)
pm.connectControl("log_to_console", "defaultArnoldRenderOptions.log_to_console", index=1)
pm.connectControl("log_to_console", "defaultArnoldRenderOptions.log_to_console", index=2)
pm.checkBoxGrp("log_to_file", label="File", changeCommand=ChangeLogToFile)
pm.connectControl("log_to_file", "defaultArnoldRenderOptions.log_to_file", index=1)
pm.connectControl("log_to_file", "defaultArnoldRenderOptions.log_to_file", index=2)
cmds.rowLayout(
numberOfColumns=2, columnWidth2=(80, 220), adjustableColumn=2, columnAttach=[(1, "left", 0), (2, "left", -10)]
)
path = cmds.textFieldGrp("ls_log_filename", label="Filename", enable=logToFile, cc=updateLogSettings, width=325)
cmds.symbolButton(
"ls_log_filename_button", image="navButtonBrowse.png", command=LoadFilenameButtonPush, enable=logToFile
)
pm.connectControl("ls_log_filename", "defaultArnoldRenderOptions.log_filename", index=1)
pm.connectControl("ls_log_filename", "defaultArnoldRenderOptions.log_filename", index=2)
pm.setParent("..")
"""
pm.attrControlGrp('log_filename',
label="Filename",
attribute='defaultArnoldRenderOptions.log_filename',
cc=updateLogSettings)
"""
pm.attrControlGrp(
"log_max_warnings",
label="Max. Warnings",
enable=logToConsole or logToFile,
attribute="defaultArnoldRenderOptions.log_max_warnings",
)
pm.setParent("..")
pm.setUITemplate(popTemplate=True)
开发者ID:Quazo,项目名称:breakingpoint,代码行数:53,代码来源:settings.py
示例13:
def setButtonIcon ():
_width = cmds.gridLayout ( 'grid_selectAxis', query = True, width = True )
_axis = cmds.radioCollection ( 'radioCollection_axis', query = True, select = True )
_keepShape = cmds.checkBox ( 'check_keepShape', query = True, value = True )
if _keepShape: _keepShape = 'KeepShape'
else: _keepShape = ''
cmds.symbolButton ( 'orientMinusButton', edit = True, width = _width / 2,
image = 'ford_riggingAid__orient'+_axis+'minus'+_keepShape+'.xpm' )
cmds.symbolButton ( 'orientPlusButton', edit = True, width = _width / 2,
image = 'ford_riggingAid__orient'+_axis+'plus'+_keepShape+'.xpm' )
开发者ID:danielforgacs,项目名称:code-dump,代码行数:12,代码来源:ford_riggingAid.py
示例14: setCommand
def setCommand(self, cmd, cmdOff=False):
if( self.ctrlType == "ctrl" ):
cmds.symbolButton( self.gui, edit=True, command=cmd)
elif( self.ctrlType == "chk"):
cmds.symbolCheckBox( self.gui, edit=True, command=cmd)
cmds.symbolCheckBox( self.gui, edit=True, onCommand=cmd)
if( cmdOff ):
cmds.symbolCheckBox( self.gui, edit=True, offCommand=cmdOff)
if( cmdOff ):
self.command = [cmd, cmdOff]
else:
self.command = cmd
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:12,代码来源:mecCharGUIGen.py
示例15: launchFromCmdWndIcon
def launchFromCmdWndIcon():
'''launch from maya command line script editor icon.'''
def cmdWnd(arg=None):
cmds.ScriptEditor()
highlightCmdReporter()
# get command line formLayout
gCommandLineForm = mel.eval('$tempVar = $gCommandLineForm')
commandLineForm = cmds.formLayout(gCommandLineForm, q=1, ca=1)[0]
# get cmdWndIcon button
cmdWndIcon = cmds.formLayout(commandLineForm, q=1, ca=1)[-1]
# change the command of the button
cmds.symbolButton(cmdWndIcon, e=1, c=cmdWnd)
开发者ID:iVerb,项目名称:myRandomStuff,代码行数:13,代码来源:cmdReporterHighlighter.py
示例16: ArnoldGpuCacheTemplateNew
def ArnoldGpuCacheTemplateNew(plugName) :
AttrName = plugName.split('.')[-1]
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1 \2', AttrName)
s2 = re.sub('(.)(file+)', r'\1 \2', s1)
NiceName = re.sub('([a-z0-9])([A-Z])', r'\1 \2', s2).title()
cmds.setUITemplate('attributeEditorTemplate',pst=True)
cmds.rowLayout( numberOfColumns=3 )
cmds.text(label=NiceName)
path = cmds.textField('GpuCache%sPath'%AttrName) # ,changeCommand=lambda *args: ArnoldGpuCacheEdit(plugName, *args)
cmds.symbolButton('GpuCache%sPathButton'%AttrName, image='navButtonBrowse.png')
cmds.setUITemplate(ppt=True)
ArnoldGpuCacheTemplateReplace(plugName)
开发者ID:BlueBolt,项目名称:bb_gpuCacheTranslator,代码行数:14,代码来源:gpuCacheTemplate.py
示例17: ArnoldVolumeTemplateDsoNew
def ArnoldVolumeTemplateDsoNew(nodeName):
cmds.rowColumnLayout(
numberOfColumns=3,
columnAlign=[(1, "right"), (2, "right"), (3, "left")],
columnAttach=[(1, "right", 0), (2, "both", 0), (3, "left", 5)],
columnWidth=[(1, 145), (2, 220), (3, 30)],
)
cmds.text(label="DSO ")
path = cmds.textField("arnoldVolumeDsoPath", changeCommand=lambda *args: ArnoldVolumeDsoEdit(nodeName, *args))
cmds.textField(path, edit=True, text=cmds.getAttr(nodeName))
cmds.symbolButton(
"arnoldVolumeDsoPathButton",
height=20,
image="navButtonBrowse.png",
command=lambda *args: LoadVolumeDsoButtonPush(nodeName),
)
开发者ID:Quazo,项目名称:breakingpoint,代码行数:16,代码来源:aiVolumeTemplate.py
示例18: populateToolbar
def populateToolbar( *args ):
iconPath = os.path.join ( ehsan_script_directory , 'ui', 'icons' )
icons = os.listdir( iconPath )
# find categories
rawCategories = []
for icon in icons:
if '__' in str(icon): # ignore files other than ones with '__' in their names
rawCategories.append( icon.partition('__')[0] )
categories = list( set( rawCategories ) )
categories.sort()
# create frame layout for each category
for category in categories:
widgets[ category+'_frameLayout' ] = cmds.frameLayout( label=category,w=150, collapsable=True, parent=widgets['mainLayout'] )
widgets[ category+'layout' ] = cmds.rowColumnLayout( nc=3 )
# create icons
for icon in icons:
iconName = icon.partition('.')[0]
category = icon.partition('__')[0]
command = iconName.partition('__')[2]
if '__' in str(icon): # ignore files other than ones with '__' in their names
widgets[ icon + '_button'] = cmds.symbolButton( c=partial(runMethod,category,command) , w=50, h=50, image=(os.path.join (iconPath,icon)), parent=widgets[ category+'layout' ], annotation= command )
开发者ID:satishgoda,项目名称:EHM_tools,代码行数:26,代码来源:__init__.py
示例19: button
def button(text, command, icon):
image = os.path.join(os.path.dirname(os.path.realpath(__file__)), "images", "icons", icon)
ui = []
ui.append(cmds.rowLayout(ad2=2, nc=2))
ui.append(cmds.symbolButton(image=image, h=50, w=50, c=command))
ui.append(cmds.button(label=text, h=50, c=command))
cmds.setParent("..")
return ui
开发者ID:internetimagery,项目名称:daily_pose,代码行数:8,代码来源:settings.py
示例20: __init__
def __init__(self):
# Remove existing window
if cmds.window(GUIDE_UI_WINDOW_NAME, exists=True):
cmds.deleteUI(GUIDE_UI_WINDOW_NAME)
# Create Window and main tab
self.ui_window = cmds.window(GUIDE_UI_WINDOW_NAME, width=400, height=600, title="Guide Tools", sizeable=True)
self.ui_topLevelColumn = cmds.columnLayout(adjustableColumn=True, columnAlign="center")
self.ui_tabs = cmds.tabLayout(width=300, height=600, innerMarginWidth=5, innerMarginHeight=5)
tabWidth = cmds.tabLayout(self.ui_tabs, q=True, width=True)
#
self.ui_compColumn = cmds.columnLayout(adj=True, rs=3)
self.ui_compFrameLayout = cmds.frameLayout(height=300, collapsable=False, borderVisible=False, labelVisible=False)
self.ui_compList_Scroll = cmds.scrollLayout(hst=0)
self.ui_compList_column = cmds.columnLayout(columnWidth=300, adj=True, rs=2)
cmds.separator()
# List of components
import mgear.maya.rig.component as comp
path = os.path.dirname(comp.__file__)
for comp_name in os.listdir(path):
if not os.path.exists(os.path.join(path, comp_name, "__init__.py")):
continue
module = __import__("mgear.maya.rig.component."+comp_name, globals(), locals(), ["*"], -1)
reload(module)
buttonSize = 32
row = cmds.rowLayout(numberOfColumns=2, columnWidth=([1, buttonSize]), adjustableColumn=2, columnAttach=([1, "both", 0], [2, "both", 5]))
cmds.symbolButton(width=buttonSize, height=buttonSize, bgc=[1,1,1])
textColumn = cmds.columnLayout(columnAlign="center")
cmds.text(align="center", width=250, label=module.NAME)
cmds.scrollField(text=module.DESCRIPTION, editable=False, width=250, height=50, wordWrap=True)
cmds.setParent(self.ui_compList_column)
cmds.separator()
# Display the window
cmds.tabLayout(self.ui_tabs, edit=True, tabLabelIndex=([1, "Modules"]))
cmds.showWindow(self.ui_window)
开发者ID:MagSec-Arts,项目名称:mgear,代码行数:46,代码来源:guide.py
注:本文中的maya.cmds.symbolButton函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论