本文整理汇总了Python中maya.cmds.scrollLayout函数的典型用法代码示例。如果您正苦于以下问题:Python scrollLayout函数的具体用法?Python scrollLayout怎么用?Python scrollLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了scrollLayout函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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)
示例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)
示例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)
示例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)
示例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)
示例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])
示例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)
示例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)
示例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
示例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")
示例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)])
示例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()
示例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')
示例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)
示例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