本文整理汇总了Python中maya.cmds.scrollLayout函数的典型用法代码示例。如果您正苦于以下问题:Python scrollLayout函数的具体用法?Python scrollLayout怎么用?Python scrollLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了scrollLayout函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: UI
def UI():
bdWin = "FootballUtils"
if cmds.window(bdWin,q=True,ex=True):
cmds.deleteUI(bdWin)
cmds.window(bdWin,title = "Football Utils")
cmds.scrollLayout(horizontalScrollBarThickness=16)
bdMainCL = cmds.columnLayout(columnAttach=("both",5),rowSpacing=10,columnWidth=320)
#Bip List
bdFL1 = cmds.frameLayout(label="Bips",bs="etchedOut",w=300,mw=5,cll=1,p=bdMainCL)
bdRL= cmds.rowLayout(numberOfColumns=2, columnWidth2=(150, 150), p=bdFL1 )
bdBipList = cmds.textScrollList('bipList',numberOfRows = 10, allowMultiSelection=True,height = 100,sc=bdSelectBip,p=bdRL)
bdGenericList = cmds.textScrollList('genericList',numberOfRows = 10, allowMultiSelection=True,height = 100,sc=bdSelectGeneric,p=bdRL)
bdPopulateBipList()
cmds.button(l="Rename Bips",c=bd_renameBips,p=bdFL1 )
bdFL2 = cmds.frameLayout(label="Generic",bs="etchedOut",w=300,mw=5,cll=1,p=bdMainCL)
cmds.button(l="Import Generic Character",al="right",c = bdImportGeneric)
cmds.button(l="Duplicate Generic Character",al="right",c = bdDuplicateGeneric)
cmds.text(l='Note: Even if there is only one Generic, click Duplicate Generic\n Use the Global_Scale_Anim to scale the Generic chars')
cmds.button(l="Copy Anim ",al="right",c = bd_mocapToCotrollers)
cmds.button(l="Bake Anim",al="left",c = bd_bakeControllers);
cmds.button(l="Remove Mocap data",c =bdRemoveMocapData)
#END JOINTS CREATION
cmds.showWindow(bdWin)
开发者ID:Mortaciunea,项目名称:bdScripts,代码行数:29,代码来源:bd_MultiCopyMocap_UI.py
示例2: bdMainWindow
def bdMainWindow():
bdWin = "CreateSkeleton"
if cmds.window(bdWin,q=True,ex=True):
cmds.deleteUI(bdWin)
cmds.window(bdWin,title = "Create Skeleton")
cmds.scrollLayout(horizontalScrollBarThickness=16)
bdMainCL = cmds.columnLayout(columnAttach=("both",5),rowSpacing=10,columnWidth=320)
#GUIDES CREATION
bdFL1 = cmds.frameLayout(label="Template Guides",bs="etchedOut",w=300,mw=5,cll=1,p=bdMainCL)
bdCL1= cmds.columnLayout(rs=5,adj=1,p=bdFL1)
#Character Name
cmds.textFieldGrp("bdChName",l="Character Name",tx="")
#Number of Fingers/Toes
#cmds.intSliderGrp("bdFingersNumber",label="Number of Fingers",field=True,minValue=1,maxValue=5,fieldMinValue=1,fieldMaxValue=5,value=4,cw3=(100,30,10),dc=bdSetFingersNumber)
#cmds.checkBoxGrp("bdHasThumb",numberOfCheckBoxes=1, label='Thumb?')
#cmds.intSliderGrp("bdToesNumber",label="Number of Toes",field=True,minValue=1,maxValue=5,fieldMinValue=1,fieldMaxValue=5,value=4,cw3=(100,30,10),dc=bdSetToesNumber)
cmds.button(l="Import Template",c=bdImportTemplate)
#Character Scale Slider
cmds.floatSliderGrp("bdScaleSlider",en=0,label="Guide scale",field=True,minValue=1,maxValue=100,fieldMinValue=1,fieldMaxValue=100,value=1,cw3=(70,30,10),dc=bdScaleGuides)
#Character Mirror
cmds.rowColumnLayout(nc=2,cw=[(1,138),(2,138)],p=bdCL1);
cmds.button(l="Mirror left << ",al="right",c = functools.partial(bdMirrorGuide,"left"))
cmds.button(l=">> Mirror right",al="left",c = functools.partial(bdMirrorGuide,"right"));
#END GUIDES CREATION
#JOINTS CREATION
bdFL2 = cmds.frameLayout(label="Create Joints",bs="etchedOut",w=300,mw=5,cll=1,p=bdMainCL)
bdCL2 = cmds.columnLayout(rs=5,adj=1,p=bdFL2)
cmds.button(l="Create Joints",c =bdCreateSkeleton)
#floatSliderGrp -en 0 -label "THUMB Orient" -field true -minValue 0 -maxValue 180 -fieldMinValue 1 -fieldMaxValue 100 -value 0 -cw3 80 40 10 -dc bdJointOrientX bdJointXSlider;
#END JOINTS CREATION
cmds.showWindow(bdWin)
开发者ID:Mortaciunea,项目名称:bdScripts,代码行数:34,代码来源:bdPyRig.py
示例3: buildMainLayout
def buildMainLayout(self):
'''Build the main part of the ui
'''
tabs = mc.tabLayout()
tab1 = mc.columnLayout(adj=True)
mc.scrollLayout(cr=True)
self.shelfLayout = mc.shelfLayout()
self.refreshShelfLayout()
mc.setParent(tabs)
tab2 = mc.columnLayout(adj=True)
mc.separator(height=8, style='none')
mc.text('Select curve(s) to export. Multiple selected curves will be combined.')
mc.text('Center and fit the curve in the viewport,')
mc.text('and make sure nothing else is visible for best icon creation.')
mc.separator(height=16, style='in')
mc.button('Export Selected Curve', command=self.exportControl, annotation='Select a nurbsCurve to export.')
mc.tabLayout( tabs, edit=True, tabLabel=((tab1, 'Import'),
(tab2, 'Export')
))
if not mc.shelfLayout(self.shelfLayout, query=True, numberOfChildren=True):
mc.tabLayout( tabs, edit=True, selectTab=tab2)
开发者ID:Italic-,项目名称:maya-prefs,代码行数:30,代码来源:ml_controlLibrary.py
示例4: fix_defaultnames
def fix_defaultnames(objectswithdefaultnames):
"""Find objects with names that Maya uses when the user creates an object
and fails to rename it.
---
Naming (detect default names).
Open list window with object names for review.
fix_defaultobjectnames(list) create a UI for renaming objects with
invalid (default) names.
"""
verbose = cmds.optionVar(query='checkmateVerbosity')
if cmds.window('showObjectNamesWin', exists=True):
cmds.deleteUI('showObjectNamesWin')
win = cmds.window('showObjectNamesWin',
width =340,
height=400,
title="Objects with default names")
cmds.scrollLayout(childResizable=True)
cmds.columnLayout(adjustableColumn=True)
numitems = 0
for item in objectswithdefaultnames:
if numitems < 500:
numitems = numitems + 1
# cmds.button(label='select', command='cmds.select(\'%s\')' % item)
cmds.nameField(object=item,
receiveFocusCommand='cmds.select(\'%s\')' % item)
else :
break
cmds.showWindow(win)
开发者ID:Kif11,项目名称:turbosquid_maya_publisher,代码行数:29,代码来源:names.py
示例5: modulesLayout
def modulesLayout():
moduleArm = moduleType('Arm')
moduleLeg = moduleType('Leg')
moduleSpine = moduleType('spine')
cmds.frameLayout(label='Prefix :',mw =1 ,mh =3,bs="etchedOut",cl= 0,cll=0,w=442)
cmds.rowColumnLayout (nc=4,cw=[(1,50),(2,90),(3,80),(4,100)])
cmds.text(l =" Name :",align="left" )
cmds.textField()
cmds.text(l =" Side : ",align="center" )
cmds.optionMenu (l='Method:')
cmds.menuItem(label ="l/r",c ="")
cmds.menuItem(label ="lt/rt",c ="")
cmds.menuItem(label= "left/right",c='')
cmds.menuItem(label= "custom",c='')
cmds.menuItem(label= "none",c='')
cmds.separator(height= 7,style ="none")
cmds.setParent('..')
cmds.rowColumnLayout (nc=3,cw=[(1,137),(2,137),(3,137)])
cmds.text(l ="Left :",align="center" )
cmds.text(l ="Center :",align="center" )
cmds.text(l ="Right : ",align="center" )
cmds.colorIndexSliderGrp('leftColorGrp',min =1 ,max= 31 ,value= 14 ,columnWidth=[(1,37),(2,100)])
cmds.colorIndexSliderGrp('centerColorGrp',min =1 ,max= 31 ,value= 23 ,columnWidth=[(1,37),(2,100)])
cmds.colorIndexSliderGrp('rightColorGrp',min =1 ,max= 31 ,value= 7 ,columnWidth=[(1,37),(2,100)])
cmds.setParent('..')
cmds.setParent('..')
cmds.separator(height =7 ,style= "none" )
cmds.scrollLayout(horizontalScrollBarThickness=16,verticalScrollBarThickness=16,h=285)
moduleArm.mainModule()
moduleLeg.mainModule()
moduleSpine.mainModule()
cmds.setParent('..')
cmds.button(l='Build Skeleton',h=50)
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:35,代码来源:Ui.py
示例6: SundayControllerToolUI
def SundayControllerToolUI():
global sundayControllerToolUI
SundayMayaGuiPath = mel.eval('getenv SundayGui;')
try:
if cmds.window(sundayControllerToolUI, exists = True):
cmds.deleteUI(sundayControllerToolUI)
sundayControllerToolUI = cmds.loadUI(uiFile = SundayMayaGuiPath + 'SundayControllerTool.ui')
except:
sundayControllerToolUI = cmds.loadUI(uiFile = SundayMayaGuiPath + 'SundayControllerTool.ui')
cmds.setParent(sundayControllerToolUI)
cmds.setParent(cmds.button('SundayControllerToolChooseColorDummyButtonToGrabParent', query = True, fullPathName = True, parent = True))
cmds.iconTextRadioCollection('ltColorCollection')
cmds.rowColumnLayout(numberOfColumns = 8)
cmds.text(label = 'Color : ')
cmds.iconTextRadioButton('DarkBlue_5', image1 = SundayImage + 'SundayColorDarkBlue.png', height = 20, width = 20, select = True)
cmds.iconTextRadioButton('DarkRed_4', image1 = SundayImage + 'SundayColorDarkRed.png', height = 20, width = 20)
cmds.iconTextRadioButton('Purple_9', image1 = SundayImage + 'SundayColorPurple.png', height = 20, width = 20)
cmds.iconTextRadioButton('Red_13', image1 = SundayImage + 'SundayColorRed.png', height = 20, width = 20)
cmds.iconTextRadioButton('Green_14', image1 = SundayImage + 'SundayColorGreen.png', height = 20, width = 20)
cmds.iconTextRadioButton('LightBlue_18', image1 = SundayImage + 'SundayColorLightBlue.png', height = 20, width = 20)
cmds.iconTextRadioButton('Yellow_17', image1 = SundayImage + 'SundayColorYellow.png', height = 20, width = 20)
cmds.setParent(sundayControllerToolUI)
cmds.setParent(cmds.button('SundayControllerToolDummyButtonToGrabParent', query = True, fullPathName = True, parent = True))
cmds.scrollLayout(childResizable = True)
cmds.rowColumnLayout(numberOfColumns = 8)
SundayLocatorToolPy.SundayLocatorToolMakeLocatorButtonsInWidget('SundayControllerToolPy\nreload(SundayControllerToolPy)\nSundayControllerToolPy.SundayControllerToolApply')
cmds.showWindow(sundayControllerToolUI)
if platform.system() == 'Windows':
cmds.window(sundayControllerToolUI, edit = True, topLeftCorner = [
100,
100])
开发者ID:elliottjames,项目名称:jeeves,代码行数:34,代码来源:SundayControllerToolPy.py
示例7: ruMainWindow
def ruMainWindow():
ruWin = "riggUtils"
if mc.window(ruWin,q=True,ex=True):
mc.deleteUI(ruWin)
mc.window(ruWin,title = "Rigging Utilities")
mc.scrollLayout(horizontalScrollBarThickness=16)
ruMainColumn = mc.columnLayout(columnAttach=("both",5),rowSpacing=10,columnWidth=320)
mc.frameLayout(label="General",bs="etchedOut",w=300,mw=5,cll=1)
mc.button(label='Show Axis',command='mc.toggle(state=True, localAxis=True)')
mc.button(label='Hide Axis',command='mc.toggle(state=False, localAxis=True)')
mc.frameLayout(label="Non T-Pose joint placer",bs="etchedOut",w=300,mw=5,cll=1,p=ruMainColumn)
mc.columnLayout(rs=5,adj=1)
mc.button(l="Create Helper Locator",c =ruCreateLocator)
mc.button(l="Create Joint on Helper Locator",c =ruCreateJointLocator)
mc.floatSliderGrp("ruJointRadius",en=1,label="Joint Radius",field=True,minValue=0,maxValue=5,fieldMinValue=0,fieldMaxValue=5,value=0.5,cw3=(70,30,10),dc=ruJointRadius)
mc.frameLayout(label="Fingers Utils",bs="etchedOut",w=300,mw=5,cll=1,p=ruMainColumn)
mc.columnLayout(rs=5,adj=1)
mc.floatSliderGrp("ruJointOrientation",en=1,label="Finger Orient",field=True,minValue=0,maxValue=5,fieldMinValue=0,fieldMaxValue=5,value=0.5,cw3=(70,30,10),dc=ruOrientJoint)
mc.frameLayout(label="Finger Renaming",bs="etchedOut",w=300,mw=5,cll=1)
mc.optionMenu('ruFinger',l='Choose finger')
mc.menuItem(l='Thumb')
mc.menuItem(l='Index')
mc.menuItem(l='Middle')
mc.menuItem(l='Ring')
mc.menuItem(l='Pinky')
mc.textFieldButtonGrp( label='Template string', text='', buttonLabel='Rename', bc=ruRenameFinger, cw3=[120,70,70],ct3=['left','left','left'],co3=[2,2,2] )
mc.showWindow(ruWin)
开发者ID:Mortaciunea,项目名称:bdScripts,代码行数:31,代码来源:riggUtils.py
示例8: csMainWindow
def csMainWindow():
csWin = "CreateSkeleton"
if mc.window(csWin,q=True,ex=True):
mc.deleteUI(csWin)
mc.window(csWin,title = "Create Skeleton")
mc.scrollLayout(horizontalScrollBarThickness=16)
csMainCL = mc.columnLayout(columnAttach=("both",5),rowSpacing=10,columnWidth=320)
#GUIDES CREATION
csFL1 = mc.frameLayout(label="Create Guides",bs="etchedOut",w=300,mw=5,cll=1,p=csMainCL)
csCL1= mc.columnLayout(rs=5,adj=1,p=csFL1)
#Character Name
mc.textFieldGrp("csChName",l="Character Name",tx="")
#Number of Fingers/Toes
#mc.intSliderGrp("csFingersNumber",label="Number of Fingers",field=True,minValue=1,maxValue=5,fieldMinValue=1,fieldMaxValue=5,value=4,cw3=(100,30,10),dc=csSetFingersNumber)
#mc.checkBoxGrp("csHasThumb",numberOfCheckBoxes=1, label='Thumb?')
#mc.intSliderGrp("csToesNumber",label="Number of Toes",field=True,minValue=1,maxValue=5,fieldMinValue=1,fieldMaxValue=5,value=4,cw3=(100,30,10),dc=csSetToesNumber)
mc.button(l="Create Guides",c=csCreateGuides)
#Character Scale Slider
mc.floatSliderGrp("csScaleSlider",en=0,label="Guide scale",field=True,minValue=1,maxValue=100,fieldMinValue=1,fieldMaxValue=100,value=1,cw3=(70,30,10),dc=csScaleGuides)
#Character Mirror
mc.rowColumnLayout(nc=2,cw=[(1,138),(2,138)],p=csCL1);
mc.button(l="Mirror left << ",al="right",c = functools.partial(csMirrorGuide,"left"))
mc.button(l=">> Mirror right",al="left",c = functools.partial(csMirrorGuide,"right"));
#END GUIDES CREATION
#JOINTS CREATION
csFL2 = mc.frameLayout(label="Create Joints",bs="etchedOut",w=300,mw=5,cll=1,p=csMainCL)
csCL2 = mc.columnLayout(rs=5,adj=1,p=csFL2)
mc.button(l="Create Joints",c =csCreateJoints)
#floatSliderGrp -en 0 -label "THUMB Orient" -field true -minValue 0 -maxValue 180 -fieldMinValue 1 -fieldMaxValue 100 -value 0 -cw3 80 40 10 -dc csJointOrientX csJointXSlider;
#END JOINTS CREATION
mc.showWindow(csWin)
开发者ID:Mortaciunea,项目名称:bdScripts,代码行数:34,代码来源:createSkeleton+-+Copy.py
示例9: moduleGUI
def moduleGUI( self ):
col = cmds.columnLayout( adjustableColumn=True, columnAttach=('both', 5), parent=self.fillArea )
# Frame area.
cmds.text( label='FRAMES', height=20, font='boldLabelFont', backgroundColor=[0.2,0.2,0.2] )
cmds.separator( style='none', height=5 )
# Frame template section.
cmds.rowColumnLayout( numberOfColumns=2, columnWidth=[(1, 40), (2, self.winWidth-40)] )
# Left column.
self.toggleColumn = cmds.rowColumnLayout( numberOfColumns=1 )
cmds.symbolCheckBox( image='icon_root.png', value=0, annotation='roots', changeCommand=self.moduleButtons )
cmds.symbolCheckBox( image='icon_spine.png', value=0, annotation='spines', changeCommand=self.moduleButtons )
cmds.symbolCheckBox( image='icon_arm.png', annotation='arms', changeCommand=self.moduleButtons )
cmds.symbolCheckBox( image='icon_leg.png', annotation='legs', changeCommand=self.moduleButtons )
cmds.symbolCheckBox( image='icon_hand.png', annotation='hands', changeCommand=self.moduleButtons )
cmds.symbolCheckBox( image='icon_foot.png', annotation='feet', changeCommand=self.moduleButtons )
cmds.symbolCheckBox( image='icon_head.png', annotation='heads', changeCommand=self.moduleButtons )
cmds.setParent( '..' )#toggleColumn
# Right column.
cmds.scrollLayout( horizontalScrollBarThickness=16, verticalScrollBarThickness=16, height=100 )
self.frameGrid = cmds.gridLayout( numberOfColumns=4, cellWidthHeight=( 50, 50 ) )
self.moduleButtons()
cmds.setParent( '..' )#frameGrid
cmds.setParent( '..' )#scrollLayout
cmds.setParent( '..' )#rowColumnLayout
cmds.separator( style='none', height=10 )
cmds.setParent( '..' )#col
开发者ID:EriLee,项目名称:marigold,代码行数:28,代码来源:mainGUI.py
示例10: buildUI
def buildUI(self) :
self.resetExternalContext()
self.window = cmds.window("autorigging_ui", title="Auto-rigging (BB, EL, TP)", w=self.width, h=self.height)
# Title
cmds.columnLayout(w=self.width, h=self.height)
cmds.separator(h=10)
cmds.text(label="Autorigging", w=self.width,h=20, backgroundColor=[0.15,0.15,0.15])
cmds.separator(h=10)
# Mesh selector
self.meshSelector = cmds.optionMenu(w=self.width,h=30,label="Choisissez un Mesh :")
for m in cmds.ls(type="transform"):
cmds.menuItem(label=str(m))
cmds.separator(h=40)
# Point buttons
cmds.scrollLayout(w=self.width)
self.definePointButtons()
# Action buttons (enter mode)
cmds.setParent("..")
cmds.setParent("..") # Here to exit scrollLayout
cmds.separator(h=10)
cmds.rowLayout(numberOfColumns=3)
self.activateButton = cmds.button("activetaBtn",
label="Activer",
w=self.width/3 - 10,
h=self.pointButtonHeight,
command=self.onActivateButtonClick
)
self.generateButton = cmds.button("generateBtn",
label="Generer",
w=self.width/3 - 10,
h=self.pointButtonHeight,
command=self.onGenerateButtonClick
)
self.autoGenerateButton = cmds.button("generateAutoRigBtn",
label="AutoGenerer",
w=self.width/3 - 10,
h=self.pointButtonHeight,
command=self.onAutoRigButtonClick
)
# Console
cmds.setParent("..")
cmds.columnLayout()
cmds.separator(h=10)
self.consoleText = cmds.text(label="Auto-rigging non-actif", width=self.width, height=50, backgroundColor=[0.3,0.3,0.3])
cmds.showWindow(self.window)
cmds.draggerContext("riggingContext", space="world", pressCommand=self.on3DSceneClick)
# Registring context ?
cmds.setToolTo("riggingContext")
开发者ID:LecomteEmerick,项目名称:MayaProject,代码行数:59,代码来源:autoriggin_ui.py
示例11: resizeTextScrollers
def resizeTextScrollers(self):
width=cmds.scrollLayout('reviewScrollLayout',q=True,w=True)-20
height=cmds.scrollLayout('reviewScrollLayout',q=True,h=True)
cmds.scrollField('comment',e=True,h=(height/2)-120)
cmds.scrollField('comment',e=True,w=width)
cmds.scrollField('history',e=True,h=(height/2)-120)
cmds.scrollField('history',e=True,w=width)
cmds.rowColumnLayout('SceneNodeActivatorRC', e=True, columnWidth=[(1,(width/2)-1), (2,(width/2)-1)])
开发者ID:nicolasboselli,项目名称:test,代码行数:8,代码来源:Red9_Tools.py
示例12: __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
示例13: _showUI
def _showUI(self):
reportData=self.SceneReviewer.getReportData()
allowEdit=False
sceneName=None
date=reportData['date']
if reportData.has_key('sceneName'):
sceneName=reportData['sceneName']
author=None
if not reportData['author']:
#new sceneReport
author=getpass.getuser()
allowEdit=True
elif reportData['author']==getpass.getuser():
#current author of comment == you
author=getpass.getuser()
allowEdit=True
date=time.ctime()
else:
#current author != you
author=reportData['author']
if not date:
date=time.ctime()
if not sceneName:
sceneName=self.getSceneName()
if cmds.window(self.win, exists=True): cmds.deleteUI(self.win, window=True)
window = cmds.window(self.win, title=self.win, s=True, widthHeight=(260,300))
cmds.scrollLayout('reviewScrollLayout',rc=lambda *args:self.resizeTextScrollers())
cmds.columnLayout(adjustableColumn=True,columnAttach=('both',5))
cmds.textFieldGrp('author',label='Author', ed=False, text=author)#, tcc=partial(self.updateInternalDict))
cmds.textFieldGrp('date', label='Date', ed=False, text=date)#, tcc=partial(self.updateInternalDict))
cmds.textFieldGrp('sceneName', label='SceneName', ed=False, text=sceneName)
cmds.separator(h=15,style='none')
cmds.text(label='Comment')
cmds.scrollField('comment', text=reportData['comment'], ed=allowEdit, h=200, wordWrap=False,
kpc=partial(self.updateInternalDict),
cc=partial(self.updateInternalDict))
cmds.button(label='New Comment',bgc=r9Setup.red9ButtonBGC(1),c=partial(self.addNewComment))
cmds.separator(h=15,style='none')
cmds.text(label='History')
cmds.scrollField('history', editable=False, en=True, wordWrap=False, h=200,text=reportData['history'])
cmds.separator(h=15,style='none')
cmds.rowColumnLayout('SceneNodeActivatorRC',numberOfColumns=2,columnWidth=[(1,200),(2,200)])
cmds.button('setReviewActive',label='Activate Live Review',bgc=r9Setup.red9ButtonBGC(1),c=lambda x:self._setReviewStatus('active'))
cmds.button('setReviewInActive',label='Disable Live Review',bgc=r9Setup.red9ButtonBGC(1),c=lambda x:self._setReviewStatus('inactive'))
cmds.setParent('..')
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(window)
if self.SceneReviewer.exists():
self._setReviewStatus('active')
else:
self._setReviewStatus('inactive')
开发者ID:miketon,项目名称:SymLink,代码行数:57,代码来源:Red9_Tools.py
示例14: blender
def blender(self,*args):
"""
Second window: User enters values per node here.
"""
self.numControls = mc.intField(self.intFieldName,q=True,v=True)
self.source1 = [] #Used to store names. Assignment happens in step2.
self.source2 = []
self.target = []
self.nodeName = []
if(mc.window("ms_blending",exists=True)):
mc.deleteUI("ms_blending",window=True)
mc.window("ms_blending",title="ms_colorBlender v1.0", rtf=True)
mc.scrollLayout()
mc.columnLayout()
#Creates numControls frameLayouts by calling fieldsGrp class.
count = 1 #frameLayout counter
self.frames = []
while count < (self.numControls + 1):
inst = fieldsGrp(count) #Construct instance of frameLayout group creation class and store it.
self.frames.append( inst ) #Store created instance
count = count + 1
#Main creation window buttons/options here
mc.rowLayout(nc=4)
mc.text(" Load selected as: ")
mc.button(label="All Source1", c = self.loadAllSrc1)
mc.button(label="All Source2", c = self.loadAllSrc2)
mc.button(label="All Targets", c = self.loadAllTgt)
mc.setParent("..")
mc.separator(w=400)
mc.text("\n Prefix for each blendColor node created.")
self.prefixField = mc.textFieldGrp(label='Prefix:',text='Default')
mc.text("\n Attributes to connect into blendColor node inputs/outputs. No point. ('.')")
self.src1AttField = mc.textFieldGrp(label='Input 1:',text='rotate')
self.src2AttField = mc.textFieldGrp(label='Input 2:',text='rotate')
self.tgtAttField = mc.textFieldGrp(label='Output:',text='rotate')
mc.text("\n")
mc.text(' Source1 = 1, Source2 = 0')
self.wieghtField = mc.floatFieldGrp(label='Weight On:')
mc.rowLayout(nc=4)
mc.text(" ")
mc.text(" ")
mc.button(label="Connect", c = self.createLinkNodes )
mc.text(" ")
mc.setParent("..")
mc.setParent("..")
mc.setParent("..")
mc.showWindow("ms_blending")
mc.deleteUI('ms_colorBlender',window=True)
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:57,代码来源:ms_colorBlender.py
示例15: log
def log(message):
try:
text = cmds.text(s.GUI["text2"], q=True, label=True)
text = "%s\n:> %s" % (text, message)
cmds.text(s.GUI["text2"], e=True, label=text)
cmds.scrollLayout(s.GUI["layout2"], e=True, sp="down")
cmds.refresh(cv=True)
except RuntimeError:
pass
开发者ID:internetimagery,项目名称:maya_autoinstaller,代码行数:9,代码来源:__init__.py
示例16: widget
def widget(self,widgetParent):
hook = mc.columnLayout( adjustableColumn=True, rs=5 ,p=widgetParent)
mc.separator()
mc.rowLayout( numberOfColumns=3,
columnWidth2=(80,(self.canvasSize[0]-80-20)),
adjustableColumn=2,cl2=('left','both' ) )
mc.text(l=' Current Path :')
self.pathTxFld = mc.textField( 'buildEditor_UI_data_dir_txFld',ed=False )
mc.setParent('..')
mc.separator()
self.swtTab = mc.tabLayout( innerMarginWidth=5, innerMarginHeight=5 )
self.ImportTab = mc.frameLayout( mw=5,labelVisible=False,mh=5 ,p=self.swtTab)
self.EditTab = mc.frameLayout( mw=5,labelVisible=False,mh=5 ,p=self.swtTab)
mc.columnLayout( adjustableColumn=True)
mc.frameLayout( borderStyle='etchedIn',collapsable=False,labelVisible=False,mw= 3 ,mh=3)
mc.rowLayout( h=26,numberOfColumns=3, columnWidth3=(80,(self.canvasSize[0]-80-20),20), adjustableColumn=2,cl3=('left','both','right'))
mc.text(l=' Current Dish :')
self.currentEditedDish = mc.textField( )
rRootBtnC = mc.button(l='<' ,c=self.expose_dish_root)
self.IO_TAB = mc.tabLayout( innerMarginWidth=5, innerMarginHeight=5,p=self.EditTab )
mc.frameLayout( borderStyle='etchedIn',collapsable=False,labelVisible=False,mw= 5 ,mh=5,p=self.IO_TAB )
mc.scrollLayout( horizontalScrollBarThickness=0,verticalScrollBarThickness=8, h=200,childResizable=True )
self.dishInputsComponents = mc.columnLayout( adjustableColumn=True,rs=3)
mc.frameLayout( borderStyle='etchedIn',collapsable=False,labelVisible=False,mw= 5 ,mh=5,p=self.IO_TAB )
mc.scrollLayout( horizontalScrollBarThickness=0,verticalScrollBarThickness=8, h=200,childResizable=True)
self.dishOutputsComponents = mc.columnLayout( adjustableColumn=True,rs=3)
mc.tabLayout(self.IO_TAB ,e=True,tabLabelIndex=[1,'Inputs'])
mc.tabLayout(self.IO_TAB ,e=True,tabLabelIndex=[2,'Outputs'])
self.FindTab = mc.frameLayout( mw=5,labelVisible=False,mh=5 ,p=self.swtTab)
self.createGourmetTab()
mc.textScrollList( self.bentoElements , e=True,ra=True)
mc.tabLayout(self.swtTab ,e=True,tabLabelIndex=[1,'Import'])
mc.tabLayout(self.swtTab ,e=True,tabLabelIndex=[2,'Edit'])
mc.tabLayout(self.swtTab ,e=True,tabLabelIndex=[3,'Find'])
mc.tabLayout(self.swtTab,e=True,changeCommand=self.refresh_dishTabs_contents)
anchorDock = mc.rowLayout( numberOfColumns=2,
columnWidth2=(self.canvasSize[0]/5*2+12, 75 ),
adjustableColumn=2,
columnAlign=(1, 'right'),
columnAttach=[(1,'both',0), (2,'both',0)] ,w=self.canvasSize[0],p=self.ImportTab)
self.exposedBentos_UI(anchorDock)
#------------------------------------------------------------------------------------------------------------
self.bentosFactory_UI(anchorDock)
modulePath = ''.join(os.path.dirname(inspect.getfile(self.exposedBentos_UI)))
mc.textField( self.pathTxFld ,e=True,tx=modulePath)
开发者ID:cedricB,项目名称:circeCharacterWorksTools,代码行数:57,代码来源:manager.py
示例17: stereoPlayblastUI
def stereoPlayblastUI():
global txtf
global interaxialSleder
global zeroSleder
global win
global interFloatField
global interFloatSlider
global zeroFloatField
global zeroFloatSlider
core = None
Title = 'StereoPlayblastWin'
cams = checkCam()
heightB = len( cams )
modifyWin = heightB*25
#m = len( checkCam() )*25
if mc.windowPref('StereoPlayblastWin',exists=1):mc.windowPref('StereoPlayblastWin',remove=1)
if mc.window('StereoPlayblastWin', exists=1):mc.deleteUI('StereoPlayblastWin')
win = mc.window('StereoPlayblastWin', title = Title, wh=(470,220 + modifyWin))
mc.scrollLayout( 'scrollLayout' )
cl1 = mc.columnLayout( cat=( 'left', 3 ), cw=200, rs=5, adj=1 )
mc.button( l='Creat 3D camera', c="stereoPlayblast.creatStereo();stereoPlayblast.winNewH( len( stereoPlayblast.checkCam() )*25 );stereoPlayblast.stereoPlayblastUI()" )
mc.rowLayout( 'stereoRow', numberOfColumns=3, adjustableColumn=3 )
mc.text( l='Interaxial Separation', w=100, al='right' )
interFloatField = mc.floatField( w=70, h=20, s=10, value=6.3500, pre=3 )
interFloatSlider = mc.floatSlider( h=15, minValue=-0.000, maxValue=1000.000)
#interaxialSleder = mc.floatSliderGrp( label='interaxial Separation', w= 450, cal=[100, 'right'], field=True, minValue=-0.000, maxValue=1000.000, fieldMinValue=0.000, fieldMaxValue=1000.000, ss=1.000, value=6.3500, precision=3 )
mc.setParent('..')
mc.rowLayout( 'zeroRow', numberOfColumns=3, adjustableColumn=3 )
mc.text( l='Zero Parallax', w=100, al='right' )
zeroFloatField = mc.floatField( w=70, h=20, value=254.000, precision=3 )
zeroFloatSlider = mc.floatSlider( w=200, h=20, min=0, max=100000, step=0.1)
#zeroSleder = mc.floatSliderGrp( label='Zero Parallax', w= 450, cal=[100, 'right'], field=True, minValue=-0.000, maxValue=1000.000, fieldMinValue=0.000, fieldMaxValue=1000.000, ss=1.00, value=254.000,precision=3 )
mc.popupMenu()
mc.menuItem( l='Set Key', c='mc.sekKeyframe' )
mc.setParent('..')
mc.frameLayout(l = 'Camera List', borderStyle='etchedIn')
cl2 = mc.columnLayout()
updateCamList(cams)
#mc.frameLayout(l = 'button', borderStyle='etchedIn')
#cl3 = mc.columnLayout( cat=( 'left', 3 ), cw=200, rs=5, adj=1 )
mc.setParent('..')
rl1 = mc.rowLayout( 'camShow', numberOfColumns=4, adjustableColumn=3, p=cl1 )
mc.button( l='Hide some',w=150, c="stereoPlayblast.activeSome()", p=rl1 )
mc.button( l='playblast', w=150, c="stereoPlayblast.playBlastUser( '' )", p=rl1 )
mc.button(l = 'export camera',w=150, c="stereoPlayblast.exportCam()", p=rl1)
mc.setParent('..')
txtf = mc.textFieldButtonGrp( label='Path', text='', buttonLabel='Browse', cw3 = (40,295,50), adjustableColumn3 = 2, cl3 = ('left', 'center', 'right'),p=cl1,bc = browse, cc = getPath )
rl2 = mc.rowLayout( 'cameraShow', numberOfColumns=4, adjustableColumn=3, p=cl1 )
mc.button( l='path save',w=150, c="stereoPlayblast.saveP()", p=rl2 )
mc.button( l='left',w=150, c="stereoPlayblast.playBlastUser( 'left' )",p= rl2 )
mc.button( l='right',w=150, c="stereoPlayblast.playBlastUser( 'right' )", p=rl2 )
mc.showWindow( 'StereoPlayblastWin' )
stereoOr()
loadpreV()
开发者ID:chuckbruno,项目名称:Python_scripts,代码行数:56,代码来源:stereoPlayblast_final_01.py
示例18: build
def build(self):
if mc.window( self.win, ex=1 ): mc.deleteUI( self.win )
if mc.windowPref ( self.win, ex=1 ): mc.windowPref ( self.win, r=1 )
mc.window( self.win, title=self.title, wh=(168,213) )
mc.scrollLayout( 'scrollLayout' )
mc.columnLayout( cat=( 'left', 3 ), cw=100, rs=5, adj=0 )
mc.button( l=self.butitle, c=self.do, width=150 )
mc.text( l=self.textTitle )
self.txtField = mc.scrollField( editable=True, wordWrap=True, width=150, height=150 )
mc.setParent( '..' )
开发者ID:chuckbruno,项目名称:Python_scripts,代码行数:10,代码来源:txtFile.py
示例19: createUI
def createUI():
preUI()
mc.window( 'gitMayaWin', title="Git Tools", iconName='', widthHeight=(200, 55) )
mc.menuBarLayout()
mc.menu( label='File' )
mc.menuItem( label='Create Repo', c=lambda *args: createRepo() )
mc.setParent( '..' )
mc.columnLayout( adjustableColumn=True )
mc.rowLayout( numberOfColumns=3, columnWidth3=(80, 80, 80))
mc.button( label='Create Repo', w=80, h=80)
mc.button( label='Clone Repo', w=80, h=80)
mc.setParent( '..' )
mc.separator(h=10, style='none')
mc.textFieldButtonGrp( 'repoPath', label='Repo Path', text='', buttonLabel='Browse', bc=lambda *args: getFolder() )
mc.button( label='Refresh', c=lambda *args: initRepo() )
mc.separator(h=10, style='none')
mc.tabLayout(innerMarginWidth=5, innerMarginHeight=5)
mc.columnLayout( 'Files', adjustableColumn=True )
mc.rowColumnLayout(nc=5)
mc.separator(h=20, style='none')
mc.text(l='Working Copy Changes')
mc.separator(h=20, style='none')
mc.separator(h=20, style='none')
mc.text(l='Staged Changes')
mc.columnLayout( 'workingChangesColor', adjustableColumn=True)
mc.setParent( '..' )
mc.textScrollList( 'workingChanges', numberOfRows=16, allowMultiSelection=True)
mc.columnLayout( adjustableColumn=True )
mc.button( label='>>', c=lambda *args: addChanged())
mc.button( label='>' )
mc.separator(h=30, style='none')
mc.button( label='<', c=lambda *args: remSelected())
mc.button( label='<<' )
mc.setParent( '..' )
mc.columnLayout( 'stagedChangesColor', adjustableColumn=True )
mc.setParent( '..' )
mc.textScrollList( 'stagedChanges', numberOfRows=16, allowMultiSelection=True)
mc.setParent( '..' )
mc.textFieldButtonGrp( 'commitMessage', label='Message', text='', buttonLabel='Commit', bc=lambda *args: doCommit() )
mc.separator(h=20)
mc.setParent( '..' )
mc.columnLayout( 'History', adjustableColumn=True )
mc.intFieldGrp( 'commitCount', numberOfFields=1, label='Number of Commits', value1=10, cc=lambda *args: getCommits())
mc.scrollLayout(h=250, horizontalScrollBarThickness=16, verticalScrollBarThickness=16)
mc.rowColumnLayout( 'commitsGrid', numberOfColumns=2, cw=([1,450],[2,150]) )
mc.setParent( '..' )
mc.setParent( '..' )
mc.text(l='Commited Changes')
mc.textScrollList( 'commitChanges', numberOfRows=16, allowMultiSelection=True)
mc.showWindow( 'gitMayaWin' )
postUI()
开发者ID:artbycrunk,项目名称:maya-git,代码行数:55,代码来源:ui.py
示例20: __init__
def __init__(s, anim, validation, changeCallback):
"""
Modify animation window
"""
with report.Report():
s.anim = anim
s.validation = validation # Name validation
s.change = changeCallback
s.layers = getAllLayers() # Grab up to date layer info
winName = "Animation_Entry"
if cmds.window(winName, ex=True):
cmds.deleteUI(winName)
window = cmds.window(winName, t="Animation", rtf=True)
cmds.columnLayout(adj=True)
title("Create / Edit an Animation:")
name = cmds.textFieldGrp(
l="Name: ",
tx=s.anim.data["name"],
adj=2,
tcc=lambda x: s.valid(name, s.updateName(x)))
frame = cmds.intFieldGrp(
l="Frame Range: ",
nf=2,
v1=s.anim.data["range"][0],
v2=s.anim.data["range"][1],
cc= lambda x, y: s.valid(frame, s.updateRange(x,y))
)
title("Animation Layers")
cmds.scrollLayout(cr=True, bgc=(0.2,0.2,0.2))
def addLayer(layer):
enable = False if layer == "BaseAnimation&q
|
请发表评论