本文整理汇总了Python中pymel.core.columnLayout函数的典型用法代码示例。如果您正苦于以下问题:Python columnLayout函数的具体用法?Python columnLayout怎么用?Python columnLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了columnLayout函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: GUI
def GUI(self):
self._win = pmc.window(self.WINDOW_NAME, title=self.WINDOW_TITLE)
pmc.columnLayout(adjustableColumn=True)
self._slider = pmc.intSliderGrp(label='Segments', field=True, min=2, max=100, value=2)
pmc.button(label='Okay', c=pmc.Callback(self._callback))
pmc.button(label='Cancel', c=pmc.Callback(pmc.deleteUI, self._win))
self._win.show()
示例2: createUI
def createUI():
global m2uwin
if m2uwin is not None:
pm.deleteUI(m2uwin, window=True)
v = m2u.getVersion()
m2uwin = pm.window( title="m2u "+v+" (maya)", iconName='m2u',
widthHeight=(150, 300) )
pm.columnLayout()
pm.rowLayout(numberOfColumns = 2)
pm.button( label='Connect', c=cbConnect )
pm.button( label='Setup Cameras', c=cbSetupCamera )
pm.setParent('..')
pm.checkBox( label='Sync Camera', onc = cbSyncCamera,
ofc = cbSyncCameraOff, v = False)
pm.checkBox( label='Sync Objects', onc = cbSyncObjects,
ofc = cbSyncObjectsOff, v = False)
pm.checkBox( label='Sync Visibility', onc = cbSyncVisibility,
ofc = cbSyncVisibilityOff, v = False)
pm.separator()
pm.button( label='Fetch Selected', c = cbFetchSelected)
pm.button( label='Send Selected To Editor', c = cbSendSelectedToEd)
#pm.button( label='Import Content Test', c = cbUDKImportContent)
pm.setParent( '..' )
pm.showWindow( m2uwin )
示例3: UI
def UI():
defUI = pm.window(t = "rig companion", w = 200)
pm.columnLayout(adjustableColumn=True)
pm.button(l = "create X circle (anim)!", c = lambda *args: SmartRig_createHelpers.createCircle([1,0,0]))
pm.button(l = "create Y circle (anim)!", c = lambda *args: SmartRig_createHelpers.createCircle([0,1,0]))
pm.button(l = "create Z circle (anim)!", c = lambda *args: SmartRig_createHelpers.createCircle([0,0,1]))
pm.text(l = "-------------")
pm.button(l = "create locator 1!", c = lambda *args: SmartRig_createHelpers.createLoc(1) )
pm.button(l = "create locator 0.5 !", c = lambda *args: SmartRig_createHelpers.createLoc(0.5) )
pm.button(l = "create locator 0.2 !", c = lambda *args: SmartRig_createHelpers.createLoc(0.2) )
pm.text(l = "-------------")
pm.button(l = "create zero !", c = lambda *args: SmartRig_createHelpers.createZero())
pm.text(l = "-------------")
pm.button(l = "create dimension !", c = lambda *args: SmartRig_createHelpers.creatDist() )
pm.text(l = "-------------")
pm.button(l = "add IK attributes", c = lambda *args: smartRig_AddAttr.addAttrIK())
pm.button(l = "add switch attributes", c = lambda *args: smartRig_AddAttr.addAttrSwitch() )
pm.text(l = "-------------")
pm.button(l = "create plane", c = lambda *args: smartRig_makeRibbon.createPlane())
pm.button(l = "make ribbon", c = lambda *args: smartRig_makeRibbon.makeRibbon())
pm.text(l = "-------------")
# pm.button(l = "reset position", c = lambda *args: smartAnim.resetPosRot() )
pm.text(l = "-------------")
pm.button(l = "add curve info", c = lambda *args: smartRig_ikCurve.curveInfo() )
pm.showWindow(defUI)
示例4: __init__
def __init__(self):
winName = 'SineRigWin333'
if pm.window(winName, exists=1):
pm.deleteUI(winName,window=1)
win = pm.window(winName, t='SineRig')
pm.columnLayout(adj=1)
pm.text('X Axis should be joint chain aim axis.')
# Control
self.cnt_fld = pm.textFieldButtonGrp(l='Control',bl='Load')
pm.textFieldButtonGrp( self.cnt_fld, e=1, bc=lambda: pm.textFieldButtonGrp(self.cnt_fld,e=1,text=pm.ls(sl=1)[0]) )
# Name
self.name_fld = pm.textFieldGrp(l='Name')
# Base jnt
self.base_fld = pm.textFieldButtonGrp(l='Base Joint',bl='Load')
pm.textFieldButtonGrp( self.base_fld, e=1, bc=lambda: pm.textFieldButtonGrp(self.base_fld,e=1,text=pm.ls(sl=1)[0]) )
# Tip jnt
self.tip_fld = pm.textFieldButtonGrp(l='Tip Joint',bl='Load')
pm.textFieldButtonGrp( self.tip_fld, e=1, bc=lambda: pm.textFieldButtonGrp(self.tip_fld,e=1,text=pm.ls(sl=1)[0]) )
# Create button
pm.button(l="Create",c=self.createRig)
##### Development Aide
pm.textFieldButtonGrp(self.cnt_fld,e=1,text='TopFin_Base_ctrlA')
pm.textFieldGrp(self.name_fld,e=1,text='Fin')
pm.textFieldButtonGrp(self.base_fld,e=1,text='TopFinA_jnt_1')
pm.textFieldButtonGrp(self.tip_fld,e=1,text='TopFinA_jnt_12')
pm.showWindow(win)
示例5: __init__
def __init__(self, path):
self.path = path # the path to save the presets
preset_win = 'preset_win'
if pm.window(preset_win, exists= True):
pm.deleteUI(preset_win)
if pm.windowPref(preset_win, exists= True):
pm.windowPref(preset_win, remove= True)
temp_win = pm.window(preset_win, title= 'presets', width= 300,sizeable= False)
pm.columnLayout(adjustableColumn= True)
pm.text(label= '')
pm.text(label= 'Preset Name')
self.field = pm.textField()
pm.text(label= '')
pm.text(label= 'Description')
pm.text(label= '')
self.scroll = pm.scrollField(width= 300, wordWrap= True)
pm.text(label= '')
pm.button(label= 'Create Preset', command= pm.Callback(self.create_preset))
pm.text(label= '')
temp_win.show()
示例6: initUI
def initUI(self):
pm.setUITemplate("DefaultTemplate", pushTemplate=True)
form = pm.formLayout()
binMeshExportPath = pm.optionVar.get('mtap_binMeshExportPath', pm.workspace.path + "/geo/export.binarymesh")
prefix = pm.optionVar.get('mtap_binMeshExportPathPrefix', "prefix")
createProxy = pm.optionVar.get('mtap_binMeshCreateProxy', True)
percentage = pm.optionVar.get('mtap_binMeshPercentage', 0.1)
createStandin = pm.optionVar.get('mtap_binMeshCreateStandin', True)
oneFilePerMesh = pm.optionVar.get('mtap_binMeshOneFilePerMesh', False)
useTransform = pm.optionVar.get('mtap_binMeshUseTransform', False)
with pm.columnLayout('StandinLayout') as StandinLayout:
with pm.frameLayout('StandinLayout', label="Standin export options", collapsable=False):
with pm.columnLayout('StandinColumnLayout'):
self.pathUI = pm.textFieldButtonGrp(label="Standin directory", text=binMeshExportPath, buttonLabel="File", buttonCommand=self.fileBrowser)
self.prefixUI = pm.textFieldGrp(label="Prefix", text=prefix)
self.createProxyUI = pm.checkBoxGrp(label="Create proxy", value1=createProxy)
self.percentageUI = pm.floatFieldGrp(label="Percentage", value1=percentage)
self.createStdInUI = pm.checkBoxGrp(label="Create StandIn", value1=createStandin)
self.oneFilePerMeshUI = pm.checkBoxGrp(label="One File Per Mesh", value1=oneFilePerMesh)
self.doTransformUI = pm.checkBoxGrp(label="Use Transform", value1=useTransform)
with pm.rowColumnLayout(numberOfColumns=2):
pm.button(label="Create BinaryMesh", c=self.doit)
pm.button(label="Cancel", c=self.cancel)
pm.formLayout(form, edit=True, attachForm=[(StandinLayout, 'top', 5), (StandinLayout, 'bottom', 5), (StandinLayout, 'right', 5), (StandinLayout, 'left', 5)])
pm.setUITemplate("DefaultTemplate", popTemplate=True)
示例7: createRadioBtnObj
def createRadioBtnObj( self ):
""" creates a RadioButton Element """
if mel.scrollLayout(self._scrollField, ex=True):
mel.setParent( self._ActionCol)
mel.separator(h=10,style="none")
ObjUIpath = mel.frameLayout(mw=10,l="Radio Buttons")
mel.columnLayout('sampleCol')
mel.separator(h=10,style="none")
mel.radioButtonGrp('rbg',nrb=3,
l="Big Options",
select=self.gSampleState['rbg'],
la3=("Option 1", "Option 2", "Option 3"))
mel.radioButtonGrp('rbg2',nrb=3,
l="Little Options",
select=self.gSampleState['rbg'],
la3=("Option 4", "Option 5", "Option 6"))
mel.separator(h=10,style="none")
return ObjUIpath
示例8: lcBake_convert_lightmap
def lcBake_convert_lightmap(bakeSetListDropdown, cameraListDropdown, *args, **kwargs):
''' '''
numItems = bakeSetListDropdown.getNumberOfItems()
if numItems > 0:
currentBakeSet = bakeSetListDropdown.getValue()
if currentBakeSet:
currentCamera = cameraListDropdown.getValue()
outputDirectory = pm.textField(prefix+'_textField_texture_path', query=True, text=True)
if os.path.exists(outputDirectory):
shadows = pm.checkBox(prefix+'_checkBox_shadows', query=True, value=True)
if pm.control('bakeWindow', exists = True):
pm.deleteUI('bakeWindow')
bakeWindow = pm.window('bakeWindow', t='Batch Bake', widthHeight=[100, 100], rtf=True, mnb=False, mxb=False, s=False)
pm.columnLayout()
pm.text(l='')
pm.text(l='')
pm.text(l=' Bake In Progress ')
pm.text(l=' ...... ')
pm.text(l='')
pm.text(l='')
bakeWindow.show()
pm.refresh()
#pm.pause(seconds=10)
convertString = bake.convertLightmap(currentBakeSet, currentCamera, outputDirectory, shadows)
print('Convert Command: {0}'.format(convertString) )
pm.deleteUI('bakeWindow')
pm.select(clear=True)
else:
pm.warning('Path not found: {0}'.format(outputDirectory) )
示例9: __init__
def __init__(self, debug=0):
title="TransferBlendShapes"
if(pm.windowPref(title, q=True, ex=True)):
pm.windowPref(title, remove=True)
if(pm.window(title, q=True, ex=True)):
pm.deleteUI(title)
self.win = pm.window(title, title="Transfer BlendShapes Tool")
self.rowColumnLayoutA = pm.rowColumnLayout()
self.intro = pm.text( label='complete the following steps in order' )
self.frameLayoutA = pm.frameLayout(parent=self.rowColumnLayoutA, cl=True, cll=True, label='Step 1 Load Target Mesh', borderStyle='in' )
self.columnlayoutA = pm.columnLayout()
self.frameLayoutB = pm.frameLayout(parent=self.rowColumnLayoutA, cl=True, cll=True, label='Step 2 Import Mask', borderStyle='in' )
self.columnlayoutA = pm.columnLayout()
self.frameLayoutC = pm.frameLayout(parent=self.rowColumnLayoutA, cl=True, cll=True, label='Step 3 Manipulate Match Mesh', borderStyle='in' )
self.columnlayoutB = pm.columnLayout()
self.frameLayoutD = pm.frameLayout(parent=self.rowColumnLayoutA, cl=True, cll=True, label='Step 4 Transfer Blends', borderStyle='in' )
self.columnlayoutC = pm.columnLayout()
#self.dockControl = pm.dockControl(label=title, area='right', content=title, allowedArea=['right', 'left'], sizeable=True)
# fameA content
self.names = {'Target':None}
# Generating x number of fields based on dictionary keys of self.names
for name in self.names:
self.names[name] = pm.textFieldButtonGrp(cw = ((1, 76), (2, 176)), parent=self.frameLayoutA,
label = name,
placeholderText = 'Enter Name Here or >>>> ',
buttonLabel = 'load selected', tcc= self.prepTargetMeshOn,
buttonCommand = pm.Callback(self.nameField_load, name))
self.btn_prepTgt = pm.button(parent=self.frameLayoutA, enable=False, w=40, h=20, label="Prep Target", command=self.prepTargetMesh)
self.fA_fillText = pm.text(parent=self.frameLayoutA, label=' ' )
# fameB content
self.importText = pm.text(parent=self.frameLayoutB, label='Import the desired facial mask' )
self.manipulateText = pm.text(parent=self.frameLayoutB, label='Use the avalable controls to manipulate the mask' )
self.fitText = pm.text(parent=self.frameLayoutB, label='Roughly fit the mask to the target mesh' )
self.btn_trueHuman = pm.button(parent=self.frameLayoutB, enable=True, w=40, h=20, label="Human Anatomy", command=self.humanAnatomyImport)
self.btn_trueMuzzle = pm.button(parent=self.frameLayoutB, enable=False, w=40, h=20, label="Muzzle Anatomy", command=self.muzzleAnatomyImport)
self.btn_toonHuman = pm.button(parent=self.frameLayoutB, enable=False, w=40, h=20, label="Human Toon", command=self.humanToonImport)
self.btn_toonMuzzle = pm.button(parent=self.frameLayoutB, enable=False, w=40, h=20, label="Muzzle Toon", command=self.muzzleToonImport)
self.fB_fillText = pm.text(parent=self.frameLayoutB, label=' ' )
# fameC content
self.matchMeshText = pm.text(parent=self.frameLayoutC, label='activate match mesh and refine your geometry to better match the target' )
self.btn_trueHuman = pm.button(parent=self.frameLayoutC, enable=True, w=40, h=20, label="Activate Match Mesh", command=self.matchMesh)
self.btn_templateHuman = pm.button(parent=self.frameLayoutC, enable=True, w=40, h=20, label="template Target Mesh", command=self.tempTgt)
self.btn_referenceHuman = pm.button(parent=self.frameLayoutC, enable=True, w=40, h=20, label="reference Target Mesh", command=self.refTgt)
self.sldr_smooth = pm.intSliderGrp(parent=self.frameLayoutC, field=True, label='Match Mesh Divisions', minValue=-0, maxValue=4, fieldMinValue=-0, fieldMaxValue=4, value=0, cc=self.div_Slider_change)
self.fC_fillText = pm.text(parent=self.frameLayoutC, label=' ' )
# fameD content
self.btn_go = pm.button(parent=self.frameLayoutD, enable=True, w=40, h=20, label="Transfer Shapes", command=self.execute)
self.btn_no = pm.button(parent=self.frameLayoutD, enable=True, w=40, h=20, label="NO DONT DO IT!", command=self.close)
self.fE_fillText = pm.text(parent=self.frameLayoutD, label=' ' )
self.win.show()
if debug:
test = ['mask_blendPipe_GEO', 'mask_hiRes_GEO']
for name, test_val in zip(self.names, test):
self.names[name].setText(test_val)
示例10: __init__
def __init__(self):
if pm.window('optionVarEditor', exists=True):
pm.deleteUI('optionVarEditor')
with pm.window(title='optionVarEditor', widthHeight=(502, 552), s=False) as window:
with pm.columnLayout():
with pm.rowColumnLayout(nc=2, cw=[(1, 250), (2, 250)]):
# List Column
with pm.columnLayout():
self.search = pm.textField(width=248, cc=self.refresh, ec=self.refresh)
self.scrollList = pm.textScrollList(height=500, width=250, selectCommand=self._select, ams=True)
# Attr Column
with pm.columnLayout():
pm.text(l='optionVar Name:')
self.name = pm.textField(tx='Name', ed=False, width=248)
pm.text(l='optionVar Value:')
self.value = pm.textField(tx='value', width=248)
# Buttons
with pm.rowColumnLayout(nc=3, cw=[(1, 166), (2, 166), (3, 166)]):
pm.button(label='Create', c=self._create)
pm.button(label='Edit', c=self._edit)
pm.button(label='Delete', c=self._delete)
self.refresh()
# Render Window
window.show()
示例11: __init__
def __init__(self):
respresets = [4096, 2048, 1024, 512, 256, 128, 64, 32]
with pm.frameLayout(l='Options', cll=True, cl=False, bs='out'):
with pm.columnLayout():
pm.text('Map Size:')
pm.separator(st='in', width=160, height=8)
with pm.rowColumnLayout(nc=3, cw=[20, 60]):
pm.text(l='Width:')
self.width = pm.intField(v=1024, width=42)
with pm.optionMenu():
for i in respresets:
pm.menuItem(l=i)
pm.text(l='Height:')
self.height = pm.intField(v=1024, width=42)
with pm.optionMenu():
for i in respresets:
pm.menuItem(l=i)
pm.button(l='Get Map Size')
pm.separator(st='in', width=160, height=8)
with pm.columnLayout():
self.compSpace = pm.checkBox(l='Retain Component Spaceing',
cc=lambda *args: pm.texMoveContext('texMoveContext', e=True,
scr=self.compSpace.getValue()),
v=pm.texMoveContext('texMoveContext', q=True, scr=True))
self.pixelUnits = pm.checkBox(l='Transform In Pixels')
示例12: __init__
def __init__(self, template):
self.template = template
self.win = "arnold_filter_list_win"
if pm.window(self.win, exists=True):
pm.deleteUI(self.win)
pm.window(self.win, title="Add Light Filter",
sizeable=False,
resizeToFitChildren=True)
#pm.windowPref(removeAll=True)
pm.columnLayout(adjustableColumn=True,
columnOffset=("both", 10),
#columnAttach=('both',1),
rowSpacing=10)
self.scrollList = pm.textScrollList('alf_filter_list', nr=4, ams=False)
pm.textScrollList(self.scrollList,
e=True,
doubleClickCommand=Callback(self.addFilterAndHide))
for label, nodeType in self.filters():
pm.textScrollList(self.scrollList, edit=True, append=label)
pm.rowLayout(numberOfColumns=2, columnAlign2=("center", "center"))
pm.button(width=100, label="Add", command=Callback(self.addFilterAndHide))
pm.button(width=100, label="Cancel", command=Callback(pm.deleteUI, self.win, window=True))
pm.setParent('..')
pm.setParent('..')
pm.showWindow(self.win)
示例13: __init__
def __init__(self):
title = 'pbRenderableCurve'
version = 1.02
if pm.window('pbRCurve', exists=True):
pm.deleteUI('pbRCurve')
with pm.window('pbRCurve', title='{0} | {1}'.format(title, version), s=False) as window:
with pm.columnLayout():
with pm.frameLayout(l='Selection:', cll=True, bs='out'):
with pm.columnLayout():
self.selField = pm.textFieldGrp(text='No Curves Selected', ed=False, l='Curve:', cw2=[72, 192])
with pm.rowLayout(nc=2):
self.bRenderable = pm.checkBox(l='Renderable', cc=self.bcRenderable)
with pm.frameLayout(l='Mesh Settings:', cll=True, bs='out') as self.meshUI:
with pm.columnLayout():
with pm.rowLayout(nc=4):
self.useNormal = pm.checkBox(l='Use Normal', cc=self.bcUseNormal)
self.normalVector = [pm.intField(width=62, en=False, value=0, cc=self.setNormal),
pm.intField(width=62, en=False, value=1, cc=self.setNormal),
pm.intField(width=62, en=False, value=0, cc=self.setNormal)]
self.meshAttrs = [AttrSlider(maxValue=128, name='Thickness', obj=getCurves, type_='float', fmn=0.0001),
AttrSlider(value=3, minValue=3, maxValue=64, name='Sides', obj=getCurves, fmn=3, fmx=100),
AttrSlider(minValue=1, maxValue=32, name='Samples', obj=getCurves, fmn=1, fmx=128)]
with pm.frameLayout('Shell Settings:', cll=True, bs='out') as self.shellUI:
with pm.columnLayout():
self.bShell = pm.checkBox(l='Enable Shell', cc=self.bcShell)
self.shellAttrs = [AttrSlider(value=1, minValue=-64, maxValue=64, name='ShellThickness', obj=getCurves, type_='float'),
AttrSlider(value=1, minValue=1, maxValue=64, name='ShellDivisions', obj=getCurves, fmn=1, fmx=32)]
window.show()
pm.scriptJob(event=['SelectionChanged', self.refresh], protected=True, p=window)
self.refresh()
示例14: createTrail
def createTrail():
if pm.window('trailUI',ex=1):
pm.deleteUI('trailUI')
pm.window('trailUI')
pm.columnLayout(adj=1)
fsSample = pm.floatSliderGrp('sampleSlider', label='Sample by', cw=(1,70), adj=1, en=1,minValue=0.01, maxValue=100, fieldMinValue=0.01, fieldMaxValue=100,pre=2, field=1, v=1)
pm.separator (height=4,style="in")
startFrame = pm.playbackOptions(q=1,min=1)
currentFrame = pm.currentTime(q=1)
if currentFrame > startFrame:
startFrame = currentFrame
pm.intSliderGrp('startFrameSlider', label='Start frame', cw=(1,70), adj=1, en=1,minValue=0, maxValue=100, fieldMinValue=0, fieldMaxValue=10000, field=1, v=startFrame)
pm.popupMenu(button=3,pmc = functools.partial(setTime,'start'))
pm.intSliderGrp('endFrameSlider', label='End frame', cw=(1,70), adj=1, en=1,minValue=0, maxValue=100, fieldMinValue=0, fieldMaxValue=10000, field=1, v=startFrame+30)
pm.popupMenu(button=3,pmc = functools.partial(setTime,'end'))
pm.intSliderGrp('trailDivisions', label='Trail divisions', cw=(1,70), adj=1, en=1,minValue=1, maxValue=100, fieldMinValue=1, fieldMaxValue=10000, field=1, v=40)
pm.separator (height=4,style="in")
cbUvDistorted = pm.checkBox('cbUV',l='UV distorted',v=1)
pm.separator (height=4,style="in")
rowBtn = pm.rowColumnLayout(numberOfRows=1)
pm.button(l='Create Trail',command=functools.partial(createTrailMesh))
pm.button(l='Rebuil uvs',c=functools.partial(createTrailUv,''))
pm.button(l='ELP !!!',c=openHelpPage)
pm.showWindow('trailUI')
示例15: ui_fixComponentShading
def ui_fixComponentShading(*args):
### UI setup
global UI_name
UI_name = [ 'chk_find', 'chk_fix', 'chk_layer', 'btn_run' ]
if pm.window( 'fix_component_shading', exists=True ):
pm.deleteUI( 'fix_component_shading', window=True )
ui_layout['window'] = pm.window( 'fix_component_shading', title='Fix Component Shading', sizeable=False, h=200, w=200 )
ui_layout['mainLayout'] = pm.columnLayout( columnAlign='left', columnAttach=['left', 0] )
pm.checkBox( UI_name[0], label=' Find Component Shading Object', value=1, w=200, p=ui_layout['mainLayout'] )
pm.checkBox( UI_name[1], label=' Fix Component Shading Object', w=200, p=ui_layout['mainLayout'] )
pm.checkBox( UI_name[2], label=' Fix Ecah Render Layer', w=200, p=ui_layout['mainLayout'] )
ui_layout['ui_sub1'] = pm.formLayout(p=ui_layout['mainLayout'] )
btn = pm.button( UI_name[3] ,label=' Execute !', command=pm.Callback( doExecution ), w=100, p=ui_layout['ui_sub1'] )
pm.formLayout( ui_layout['ui_sub1'], e=True, attachForm=[ (btn, 'left', 50 ) ] )
pm.separator( h=8, w=200, style='single', p=ui_layout['mainLayout'] )
ui_layout['ui_sub2'] = pm.columnLayout(p=ui_layout['mainLayout'] )
pm.text(label=' --- This script will keep the material \n in the CURRENT render layer, so \n it better to run it in MASTER layer! --- ', bgc=[0.05, 0.05, 0.05], align='left', p=ui_layout['ui_sub2'] )
pm.showWindow( ui_layout['window'] )