本文整理汇总了Python中maya.cmds.iconTextButton函数的典型用法代码示例。如果您正苦于以下问题:Python iconTextButton函数的具体用法?Python iconTextButton怎么用?Python iconTextButton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了iconTextButton函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: createTextField
def createTextField(self, createRename, enterCommand, offCommand):
mainLayout = cmds.columnLayout(w=1, columnWidth=self.createRenameLayoutW,
parent=self.selSetsLayout,
visible=False
)
fistRowLayout = cmds.rowLayout(numberOfColumns=3, parent=mainLayout)
textField = cmds.textField(height=20, width=self.createRenameLayoutW-21,
alwaysInvokeEnterCommandOnReturn=True,
parent=fistRowLayout,
enterCommand=enterCommand
)
# X button text field
cmds.iconTextButton(style='iconOnly', h=18, w=18,
image=uiMod.getImagePath("specialTools_x"),
highlightImage=uiMod.getImagePath("specialTools_x copy"),
command=offCommand, annotation="Cancel",
parent=fistRowLayout
)
cmds.rowLayout(numberOfColumns=len(self.colors)+1, parent=mainLayout)
for loopColor in self.colors:
colorName = loopColor["name"]
colorValue = loopColor["value"]
cmds.iconTextButton("colorButton%s%s"%(createRename, colorName),
style='iconOnly',
bgc=colorValue,
height=15, width=15,
command=lambda colorName=colorName, *args: enterCommand(colorName=colorName)
)
return {"mainLayout":mainLayout, "textField":textField}
开发者ID:Italic-,项目名称:maya-prefs,代码行数:32,代码来源:selectSets.py
示例2: fillAttrList
def fillAttrList( self ):
# Clean up UI elements for refreshing the list.
lChildren = cmds.scrollLayout( self.attrList, query=True, childArray=True )
if lChildren is not None:
for c in lChildren:
cmds.deleteUI( c )
# Build list for UI.
previousColor = 2
attList = getAttrXML()
for attr in attList:
attr = [{ 'attrName':attr['name'], 'attrType':attr['attrType'], 'attrDataType':attr['attrDataType'] }]
# Set the row color.
color = 1
if previousColor is 1:
color = 2
previousColor = 2
else:
color = 1
previousColor = 1
# Make the row.
self.attrListColumn = cmds.rowColumnLayout( parent=self.attrList, numberOfColumns=3,
columnWidth=[(1,104),(2,50),(3,20)],
columnSpacing=[(1,2),(2,2),(3,2)],
backgroundColor=self.rowColors[color-1] )
cmds.text( label=attr[0]['attrName'] )
cmds.iconTextButton( annotation='Add', style='iconOnly',
width=16, image1='icon_plus16.png',
command=lambda a1=attr: addAttr( a1 ) )
self.checkBox = cmds.checkBox( label='' )
cmds.setParent( '..' )#self.attrListColumn
开发者ID:EriLee,项目名称:marigold,代码行数:34,代码来源:BitsUI.py
示例3: checkUpdates
def checkUpdates(self, gui, layout, *args):
if self.tryUpdate():
if not G.GT_wasUpdated:
hasUpdate = self.hasUpdate()
if hasUpdate != False:
cmds.iconTextButton(label="Updating...", style='textOnly', h=gui.hb, parent=layout)
cmds.progressBar("aToolsProgressBar", maxValue=100, width=50, parent=layout)
if hasUpdate == "offline_update":
offlinePath = aToolsMod.loadInfoWithUser("userPrefs", "offlinePath")
offlineFolder = offlinePath[0]
offlineFilePath = "%s%saTools.zip"%(offlineFolder, os.sep)
downloadUrl = "file:///%s%saTools.zip"%(offlineFolder, os.sep)
fileModTime = os.path.getmtime(offlineFilePath)
offline = [offlineFilePath, fileModTime]
else:
downloadUrl = DOWNLOAD_URL
offline = None
function = lambda *args:self.updateaTools(downloadUrl, offline)
G.deferredManager.sendToQueue(function, 1, "checkUpdates")
return
self.warnUpdate()
开发者ID:Italic-,项目名称:maya-prefs,代码行数:26,代码来源:generalToolsUI.py
示例4: stretchButtonsWidth
def stretchButtonsWidth(self, buttonSets):
if not cmds.window(self.mainWin, query=True, exists=True): return
mayaWinSize = cmds.window(self.mainWin, query=True, width=True)
buttonsLayoutSize = cmds.rowLayout(self.mainLayout, query=True, width=True)
if buttonsLayoutSize < mayaWinSize: return
diference = buttonsLayoutSize - mayaWinSize
sizeChart = [cmds.iconTextButton('aToolsSetBtn_%s'%loopSet, query=True, w=True) for loopSet in buttonSets]
x = 0
while True:
for n, loopSet in enumerate(buttonSets):
x += 1
if x > diference: break
if max(sizeChart) == 1:
x = diference +1
break
sizeChart[sizeChart.index(max(sizeChart))] = max(sizeChart) -1
if x > diference: break
for n, loopSet in enumerate(buttonSets):
cmds.iconTextButton('aToolsSetBtn_%s'%loopSet, edit=True, w=sizeChart[n])
开发者ID:Italic-,项目名称:maya-prefs,代码行数:25,代码来源:selectSets.py
示例5: sortSelSetButtons
def sortSelSetButtons(self, fromSelSet=None, renameSet=None):
if not fromSelSet: index = 0
else: index = self.aToolsSets.index(fromSelSet)
cmds.columnLayout(self.renameSetLayout, edit=True, parent=self.limboLayout)
for loopSet in self.aToolsSets[index:]:
extracted = self.extractInfoFromSelSet(loopSet)
colorName = extracted["colorName"]
if colorName not in G.SS_showColors:
cmds.iconTextButton('aToolsSetBtn_%s'%loopSet, edit=True, parent=self.limboLayout, visible=False)
continue
if loopSet == renameSet:
cmds.columnLayout(self.renameSetLayout, edit=True, parent=self.selSetsLayout)
cmds.iconTextButton('aToolsSetBtn_%s'%loopSet, edit=True, visible=False, w=1)
continue
cmds.iconTextButton('aToolsSetBtn_%s'%loopSet, edit=True, parent=self.limboLayout)
cmds.iconTextButton('aToolsSetBtn_%s'%loopSet, edit=True, parent=self.selSetsLayout, visible=True)
if self.selSetButtonWidth.has_key(loopSet): cmds.iconTextButton('aToolsSetBtn_%s'%loopSet, edit=True, w=self.selSetButtonWidth[loopSet])
开发者ID:Italic-,项目名称:maya-prefs,代码行数:26,代码来源:selectSets.py
示例6: settings_archive
def settings_archive(mayaFile, todo, settings):
def filepicker():
result = cmds.fileDialog2(ds=2, cap="Select a Folder.", fm=3, okc="Select")
return result[0] if result else ""
archive = settings.get("FileArchive.active", False)
path = settings.get("FileArchive.path")
# Use File Archiving
cmds.columnLayout(
adjustableColumn=True,
ann="Store a backup of the current scene into the provided folder upon each Todo completion.",
bgc=[0.5, 0.5, 0.5] if archive else [0.2, 0.2, 0.2])
cmds.checkBox(
l="Use File Archive",
v=archive,
cc=lambda x: settings.set("FileArchive.active", x))
# File archive path
cmds.rowLayout(nc=2, ad2=2)
cmds.text(label=" - ")
cmds.iconTextButton(
en=archive,
image="fileOpen.png",
l=path if path else "Pick archive folder.",
style="iconAndTextHorizontal",
c=lambda: settings.set("FileArchive.path", filepicker())) # TODO errors when no folder is chosen because of 0 index
cmds.setParent("..")
cmds.setParent("..")
开发者ID:internetimagery,项目名称:todo,代码行数:28,代码来源:FileArchive.py
示例7: _GUI_Create
def _GUI_Create(s, parent):
s._attr["specialIcon"] = s._attr.get("specialIcon", None)
s._attr["specialAnn"] = s._attr.get("specialAnn", None)
complete = s._events["complete"]
special = s._events["special"]
delete = s._events["delete"]
edit = s._events["edit"]
s._root = cmds.rowLayout(nc=4, ad4=1, p=parent)
s._labelBtn = cmds.iconTextButton(
h=30,
style="iconAndTextHorizontal",
fn="fixedWidthFont",
c=lambda: complete(s)
)
s._specialBtn = cmds.iconTextButton(
style="iconOnly",
w=30,
m=False,
c=lambda: special(s)
)
s._editBtn = cmds.iconTextButton(
style="iconOnly",
w=30,
c=lambda: edit(s)
)
s._deleteBtn = cmds.iconTextButton(
style="iconOnly",
w=30,
c=lambda: delete(s)
)
开发者ID:internetimagery,项目名称:todo,代码行数:30,代码来源:todo.py
示例8: _showUI
def _showUI(self):
if cmds.window(self.win, exists=True):
cmds.deleteUI(self.win, window=True)
cmds.window(self.win, title=self.win, widthHeight=(400, 220))
cmds.columnLayout('uicl_audioMain',adjustableColumn=True)
cmds.separator(h=15, style='none')
cmds.text(l='Select Audio to Offset')
cmds.separator(h=15, style='in')
cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 100), (2, 90), (3, 100)])
cmds.button(label='<< Offset',
ann='Nudge selected Audio Backwards',
command=partial(self.offsetSelectedBy,'negative'))
cmds.floatField('AudioOffsetBy', value=10)
cmds.button(label='Offset >>',
ann='Nudge selected Audio Forwards',
command=partial(self.offsetSelectedBy,'positive'))
cmds.setParent('..')
cmds.separator(h=15, style='in')
cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 200), (2, 90)])
cmds.button(label='Offset Range to Start at:',
ann='offset the selected range of audionodes such that they start at the given frame',
command=self.offsetSelectedTo)
cmds.floatField('AudioOffsetToo', value=10)
cmds.setParent('..')
cmds.separator(h=15, style='in')
cmds.button(label='Ripple selected',
ann="Ripple offset the selected audio nodes so they're timed one after another",
command=self.offsetRipple)
cmds.separator(h=15, style='none')
cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp',
c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200)
cmds.showWindow(self.win)
cmds.window(self.win, e=True, widthHeight=(290, 190))
开发者ID:hoorayfor3d,项目名称:Red9_StudioPack,代码行数:33,代码来源:Red9_Audio.py
示例9: createLayout
def createLayout(self):
mainLayout = cmds.rowLayout(numberOfColumns=6, parent=self.parentLayout)
#manipulator orientation
#cmds.iconTextButton("manipOrientButton", style='textOnly', label='-', h=self.hb, annotation="Selected objects", command=updateManipOrient)
#launchManipOrient()
self.autoSmartSnapKeys = AutoSmartSnapKeys()
self.selectionCounter = SelectionCounter()
#selection
cmds.iconTextButton("selectionCounterButton", style='textOnly', font="smallPlainLabelFont", label='0', h=self.hb, annotation="Selected objects")
cmds.popupMenu("selectionCounterButtonMenu", button=1, postMenuCommand=self.selectionCounter.populateMenu)
#animation crash recovery
cmds.image("animationCrashRecoveryLed", w=14, h=14, annotation="Test")
#menu
cmds.iconTextButton(style='iconOnly', w=self.wb, h=self.hb, image= uiMod.getImagePath("aTools"), highlightImage= uiMod.getImagePath("aTools copy"), annotation="aTools Menu")
self.popUpaToolsMenu()
self.update = Update()
self.update.about = self.about
self.update.checkUpdates(self, mainLayout)
# set default config and startup scripts
self.setDefaultConfig()
开发者ID:Italic-,项目名称:maya-prefs,代码行数:28,代码来源:generalToolsUI.py
示例10: installCopyRightInfo
def installCopyRightInfo(self):
""""""
cmds.frameLayout(lv=False, bs='etchedIn', mh=6, mw=6, w=1)
cmds.text(l="Soft Cluster EX", fn='boldLabelFont', align='center')
cmds.rowColumnLayout( numberOfColumns=2,
rowSpacing=[1, 8],
columnAttach=[1, "right", 5],
columnAlign=[1, "right"])
cmds.text(l="Version: ", fn='boldLabelFont')
cmds.text(l=setup.getVersion(), align='left')
cmds.text(l="Author: ", fn='boldLabelFont')
cmds.text(l="Webber Huang", align='left')
cmds.text(l="Contact: ", fn='boldLabelFont')
cmds.text(l="[email protected]", align='left')
cmds.text(l="Project Site: ", fn='boldLabelFont')
cmds.iconTextButton( style='textOnly',
l='http://riggingtd.com/downloads/soft-cluster-ex',
ann="Click to open in brower.",
c = lambda *args: setup.openBlog() )
cmds.setParent( ".." )
cmds.setParent( ".." )
开发者ID:griffinanimator,项目名称:ThirdParty,代码行数:26,代码来源:tabAbout.py
示例11: copyWorld
def copyWorld(self, *args):
#print "copyworld"
self.selection = cmds.ls(selection=True)
if len(self.selection) < 1: return
if len(self.selection) > 20:
message = "Too many objects selected, continue?"
confirm = cmds.confirmDialog( title='Confirm', message=message, button=['Yes','No'], defaultButton='Yes', cancelButton='No', dismissString='No' )
if confirm != 'Yes': return
cmds.refresh(suspend=True)
cmds.undoInfo(stateWithoutFlush=False)
self.flushCopyCache(force=True)
self.scriptJob()
self.sourceObjs = self.selection
self.targetObj = "world"
for loopObj in self.sourceObjs:
matrix = cmds.xform(loopObj, query=True, ws=True, matrix=True)
self.copyCache.append(matrix)
cmds.iconTextButton("fakeConstrainBtn", edit=True, image= uiMod.getImagePath("specialTools_fake_constrain_active"), highlightImage= uiMod.getImagePath("specialTools_fake_constrain_active copy"))
cmds.refresh(suspend=False)
cmds.undoInfo(stateWithoutFlush=True)
开发者ID:Italic-,项目名称:maya-prefs,代码行数:30,代码来源:fakeConstrain.py
示例12: setup
def setup():
try:
iconWH = 26
# modify the status line
gStatusLine = mel.eval("global string $gStatusLine;\n $temp=$gStatusLine")
if gStatusLine != "":
tempwin = cmds.window()
temp = cmds.formLayout(p=tempwin)
savePlusSceneButton = cmds.iconTextButton(
"savePlusSceneButton2", image1="save_32.png", w=iconWH, h=iconWH, c=save
)
reloadMyShelfButton = cmds.iconTextButton(
"reloadAWShelfButton", image1="reload_32.png", w=iconWH, h=iconWH, c=reloadAWShelf
)
reloadShelfButton = cmds.iconTextButton(
"reloadRiggingShelfButton", image1="riggingShelf_32.png", w=iconWH, h=iconWH, c=reloadRiggingShelf
)
reloadAnimShelfButton = cmds.iconTextButton(
"reloadAnimShelfButton", image1="animShelf_32.png", w=iconWH, h=iconWH, c=reloadAnimShelf
)
addChildFlowLayout(gStatusLine, savePlusSceneButton, 5)
addChildFlowLayout(gStatusLine, reloadMyShelfButton, 6)
addChildFlowLayout(gStatusLine, reloadShelfButton, 7)
addChildFlowLayout(gStatusLine, reloadAnimShelfButton, 8)
except:
print "andresMayaSetup.py trace: No GUI found"
开发者ID:creuter23,项目名称:tools,代码行数:26,代码来源:andresMayaSetup.py
示例13: add_script_editor_toolbar
def add_script_editor_toolbar():
# this is the last contorl on script editor tool bar
goto_btn = mc.iconTextButton(
'scriptEditorToolbarGotoLineButton', q=1, fullPathName=1)
flow_layout = re.search('.*(?=\|)', goto_btn).group()
for x in reversed(mc.layout(flow_layout, q=1, ca=1)):
if x == 'scriptEditorToolbarGotoLineButton':
break
else:
mc.deleteUI(x)
mc.setParent(flow_layout)
iconSize = 23
mc.separator(height=iconSize, horizontal=0, style='single')
mc.iconTextButton(
width=iconSize, height=iconSize,
annotation='save tabs',
image="save.png",
c=lambda *x: save_tabs()
)
mc.iconTextButton(
width=iconSize, height=iconSize,
annotation='load tabs',
image="refresh.png",
c=lambda *x: load_tabs()
)
开发者ID:oglops,项目名称:ogTools,代码行数:30,代码来源:syncScriptEditor.py
示例14: _buildSettings
def _buildSettings(s, *args):
"""
Load the settings page
"""
s.page = "settings"
s._clear()
cmds.columnLayout(adj=True, p=s.wrapper)
cmds.iconTextButton(
h=30,
ann="Click to return to your Todo list.",
image="revealSelected.png",
label="<- Todo",
style="iconAndTextHorizontal",
c=s._buildTodo)
cmds.separator()
cmds.text(label="Settings are unique to each Maya scene.", h=50)
frame = cmds.frameLayout(l="Archive options:")
# Settings module
s.fireHook("settings.archive", settings=s._buildSettings, callback=lambda x: cmds.setParent(frame))
cmds.setParent("..")
cmds.frameLayout(l="Feedback:")
cmds.iconTextButton(
image="party.png",
ann="Have any feedback? Good or bad. Love to hear it! :)",
l="Leave Feedback...",
style="iconAndTextHorizontal",
c=lambda: universalOpen("mailto:[email protected]?subject=Todo Feedback")) # TODO errors when no folder is chosen because of 0 index
开发者ID:internetimagery,项目名称:todo,代码行数:28,代码来源:Original.__init__.py
示例15: _showUI
def _showUI(self):
if cmds.window(self.win, exists=True):
cmds.deleteUI(self.win, window=True)
cmds.window(self.win, title=self.win, widthHeight=(400, 220))
cmds.columnLayout('uicl_audioMain',adjustableColumn=True)
cmds.separator(h=15, style='none')
cmds.separator(h=15, style='in')
cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 100), (2, 90), (3, 100)])
cmds.button(label='<< Offset',
ann='Nudge selected Audio Backwards',
command=partial(self.offsetSelectedBy,'negative'))
cmds.floatField('AudioOffsetBy', value=10)
cmds.button(label='Offset >>',
ann='Nudge selected Audio Forwards',
command=partial(self.offsetSelectedBy,'positive'))
cmds.setParent('..')
cmds.separator(h=15, style='in')
cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 200), (2, 90)])
cmds.button(label='Offset Range to Start at:',
ann='offset the selected range of audionodes such that they start at the given frame',
command=self.offsetSelectedTo)
cmds.floatField('AudioOffsetToo', value=10)
cmds.setParent('..')
cmds.button(label='Ripple selected',
ann="Ripple offset the selected audio nodes so they're timed one after another",
command=self.offsetRipple)
cmds.separator(h=15, style='none')
cmds.frameLayout(label='PRO : Broadcast Wav support', cll=True, cl=False, borderStyle='etchedOut')
cmds.columnLayout(adjustableColumn=True, en=r9Setup.has_pro_pack())
cmds.separator(h=5, style='none')
cmds.text(label="NOTE: These will only run if the audio is\nin the Bwav format and has internal timecode data.")
cmds.separator(h=10, style='none')
cmds.button(label='Sync Bwavs to Internal Timecode',
ann='Sync audio nodes to their originally recorded internal timecode reference',
command=self.sync_bwavs)
cmds.separator(h=10, style='in')
cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 100)], columnSpacing=[(2,20)])
cmds.button(label='Set Timecode Ref',
ann="Set the audio node to use as the reference timecode so all other become relative to this offset",
command=self.__uicb_setReferenceBwavNode)
cmds.text('bwavRefTC', label='No Reference Set')
cmds.setParent('..')
cmds.button(label='Sync Bwavs Relative to Selected',
ann="Sync audio nodes via their internal timecodes such that they're relative to that of the given reference",
command=self.sync_bwavsRelativeToo)
cmds.separator(h=10, style='in')
cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 140),(2,140)])
cmds.button(label='Timecode HUD : ON',
ann="Live monitor internal Timecode - From a selected node with Timecode Attrs",
command=self.timecodeHud)
cmds.button(label='Timecode HUD : Kill',
ann="Kill all HUD's",
command=r9Meta.hardKillMetaHUD)
cmds.setParent('uicl_audioMain')
cmds.separator(h=10, style='none')
cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp',
c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200)
cmds.showWindow(self.win)
cmds.window(self.win, e=True, widthHeight=(290, 350))
开发者ID:cgdestroyer,项目名称:Red9_StudioPack,代码行数:59,代码来源:Red9_Audio.py
示例16: dynGUI
def dynGUI( filePath, items, parent ):
'''
filePath(string) is the filePath that each file will be at.
items(string list) will be files or directories
parent(string) which gui component will the the newly created gui components will be connected to.
'''
# items will be formatted correctly so only what is needed is included.
# keeping track of all the gui components created.
guiCom = []
'''
newPath = os.path.join( filePath,item )
files = glob.glob( os.path.join(newPath,"*.mb") )
'''
# Mainlayout for the gui.
items = glob.glob( os.path.join(filePath, "*.mb"))
print("here is glob")
print( os.path.join(filePath, "*.mb") )
print(items)
cmds.setParent(parent)
mainRow = cmds.rowColumnLayout( nc=2, cw=[[1,winWidth/2],[2, winWidth/2]] )
for item in items:
# Need to check to see if there is an image version like it.
# Extra the file name
fileParts = os.path.split(item)
fileParts = os.path.splitext(fileParts[1])
# Check to see if the image exists?
'''
iconBtn = cmds.button( w=winWidth/2, h=30, label=fileParts[0], parent=mainRow,
c="print('Load file: %s')" %(item))
'''
iconBtn = cmds.iconTextButton( label=fileParts[0], style="iconAndTextHorizontal",
marginWidth=10, marginHeight=5, labelOffset=5,
w=winWidth/2, h=50 , parent=mainRow,
c=scriptName + ".cmds.file(r'%s', i=True )" %item)
#c="print('Load file: %s')" %(item))
# file -i "C:/Users/mclavan/Documents/maya/testDir/body/frm1/bones.mb";
if( os.path.exists(os.path.join(filePath,fileParts[0]+".xpm")) ):
cmds.iconTextButton(iconBtn, edit=True, image=os.path.join(filePath,fileParts[0]+".xpm") )
elif( os.path.exists(os.path.join(filePath,fileParts[0]+".bmp")) ):
cmds.iconTextButton(iconBtn, edit=True, image=os.path.join(filePath,fileParts[0]+".bmp") )
else:
print("Didn't find a match. %s != %s" %(os.path.join(filePath,fileParts[0]+".xmp"), item))
''''''
print("Icon Button:%s %s" %(item, iconBtn))
guiCom.append(iconBtn)
return guiCom
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:59,代码来源:tdClubFiles2.py
示例17: toggleSelSetsButtonColor
def toggleSelSetsButtonColor(self):
visible = (len(G.SS_showColors) < len(self.colors))
w = 25 if visible else 1
cmds.iconTextButton(self.showAllColorsButton, edit=True, visible=visible, w=w)
self.sortSelSetButtons()
self.adjustButtonsWidth()
开发者ID:Italic-,项目名称:maya-prefs,代码行数:8,代码来源:selectSets.py
示例18: SundayUIToolsDockedShaderlinerSwatchToggle
def SundayUIToolsDockedShaderlinerSwatchToggle():
if cmds.optionVar(query = 'SundayShaderlinerSwatch'):
cmds.optionVar(intValue = ('SundayShaderlinerSwatch', 0))
cmds.iconTextButton('SundayShaderlinerIcon', edit = True, image = SundayImage + 'SundaySolidSphereColor.png')
else:
cmds.optionVar(intValue = ('SundayShaderlinerSwatch', 1))
cmds.iconTextButton('SundayShaderlinerIcon', edit = True, image = SundayImage + 'SundaySolidSphere.png')
SundayUIToolsDockedShaderlinerUpdate()
开发者ID:elliottjames,项目名称:jeeves,代码行数:8,代码来源:SundayUIToolsPy.py
示例19: core
def core(self):
uiInfo.addFrameLayout( self._uiName, self._label )
uiInfo.setSpace( 10 )
textScrollArea = (self._width-20) / 2
textScrollArea2 = self._width-20-textScrollArea
cmds.rowColumnLayout( nc=4, cw=[(1,10), (2,textScrollArea),(3,textScrollArea2),(4,10)] )
uiInfo.setSpace()
self._set = cmds.textScrollList( h=100, ams=1, sc = partial( self.selectOnSetCmd ) )
self._guideSet = cmds.textScrollList( h=100, ams=1, sc = partial( self.selectOnGuideSetCmd ) )
uiInfo.setSpace()
cmds.setParent( '..' )
uiInfo.setSpace( 5 )
checkWidth = 25
textWidth = (self._width-checkWidth-20)*.45 - 5
sliderWidth = (self._width-checkWidth-20) - textWidth - checkWidth*2 + 5
cmds.rowColumnLayout( nc=7, cw=[(1,10),(2,textWidth),(3,checkWidth),(4,checkWidth),(5,checkWidth),(6,sliderWidth),(7,10)])
uiInfo.setSpace()
cmds.frameLayout( lv=0, bs='out', h=20 )
cmds.text( l='ATTRIBUTE' )
cmds.setParent( '..' )
cmds.button( 'A', c=self.allCheckBoxOnCmd, bgc=[.8,.39,.41] )
cmds.button( 'C', c=self.allCheckBoxOffCmd, bgc=[.47,.72,.21] )
cmds.button( 'R', c=self.reverseCheckBoxCmd, bgc=[.09,.41,.51] )
cmds.frameLayout( lv=0, bs='out' )
cmds.text( l='VALUE' )
cmds.setParent( '..' )
uiInfo.setSpace()
cmds.setParent( '..' )
cmds.rowColumnLayout( nc=5, cw=[(1,10),(2,textWidth),(3,20),(4,sliderWidth+checkWidth+20),(5,10)])
for i in self._sliderDefineList:
uiInfo.setSpace()
cuSlider = self.sliderSet( i[0], i[1], i[2], i[3], [(1,50),(2,150)] )
cmds.floatSliderGrp( cuSlider[1], e=1, step=0.01, fmx=100, cc=self.saveData )
uiInfo.setSpace()
self._sliders.append( cuSlider )
cmds.setParent( '..' )
uiInfo.setSpace( 10 )
cmds.rowColumnLayout( nc=4, cw=[(1,10),(2,30),(3,self._width-20-30),(4,10)])
uiInfo.setSpace()
cmds.iconTextButton( image= uiModel.iconPath +'/spoid.png', c= partial( self.getCmd ) )
uiInfo.setButton( partial( self.setCmd ) )
uiInfo.setSpace()
cmds.setParent( '..' )
uiInfo.setSpace( 10 )
uiInfo.getOutFrameLayout()
开发者ID:jonntd,项目名称:mayadev-1,代码行数:58,代码来源:guide.py
示例20: __init__
def __init__(s, i18n, char, requestCharEdit, requestClipEdit, sendRunClip):
s.i18n = i18n
s.char = char
s.requestClipEdit = requestClipEdit # We're asking to edit the clip
s.sendRunClip = sendRunClip # User wants to place the clip
s.clips = [] # Init clips!
name = s.char.metadata.get("name", "CLips").title()
if not char.data: # Does the character contain nothing?
with warn:
requestCharEdit(char, s.refresh)
s.winName = "%sWin" % name
if cmds.window(s.winName, ex=True):
cmds.deleteUI(s.winName)
s.window = cmds.window(s.winName, rtf=True, s=False, t="%s %s" % (name, i18n["clips.title"]))
cmds.columnLayout(adj=True)
cmds.rowLayout(nc=2, adj=2) # Open Row
cmds.iconTextButton(
ann=i18n["clips.editChar"],
style="iconOnly",
font="boldLabelFont",
image="goToBindPose.png",
h=50,
w=50,
bgc=[0.3,0.3,0.3],
c=lambda: requestCharEdit(s.char, s.refresh)
)
cmds.text(
l="<h1>%s</h1>" % name,
hl=True,
h=50
)
cmds.setParent("..") # Close row
cmds.columnLayout(adj=True) # Open Col
cmds.button(
l=i18n["clips.newClip"],
h=50,
c=lambda x: warn.run(requestClipEdit, s.char, s.refresh)
)
cmds.setParent("..") # Close row
cmds.floatSlider(
min=50,
max=200,
v=100,
dc=s.sizeClips,
h=20
)
cmds.separator()
cmds.frameLayout(l=i18n["clips.moreInfo"], font="tinyBoldLabelFont")
cmds.scrollLayout(cr=True, bgc=[0.2,0.2,0.2], h=400)
s.wrapper = cmds.gridLayout(w=400, cwh=[100, 120], cr=True, aec=False)
cmds.setParent("..") # Close grid
cmds.setParent("..") # Close Scroll
cmds.separator()
cmds.showWindow(s.window)
cmds.scriptJob(uid=[s.window, s.cleanup], ro=True)
s.refresh()
开发者ID:internetimagery,项目名称:clipStore,代码行数:58,代码来源:clips.py
注:本文中的maya.cmds.iconTextButton函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论