本文整理汇总了Python中pymel.core.frameLayout函数的典型用法代码示例。如果您正苦于以下问题:Python frameLayout函数的具体用法?Python frameLayout怎么用?Python frameLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了frameLayout函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
self.window = 'sdkflip'
self.title = 'ec Set Driven Key Utility'
self.width_height = (312, 289)
if py.window(self.window, exists=True):
py.deleteUI(self.window)
py.window(self.window, title=self.title, wh=self.width_height, sizeable=False)
py.scrollLayout(horizontalScrollBarThickness=16, verticalScrollBarThickness=16)
py.rowLayout("objRow", numberOfColumns=4, columnAlign2=("left", "right"), p="sdkflip")
py.columnLayout("objCol", p="objRow")
self.source_field = py.textField("sourceText", tx="Source Driver", p="objCol")
py.columnLayout("objbutCol", p="objRow")
py.button(label="<<", width=30, height=20, p="objbutCol", bgc=(0.8, 0.8, 0.8), command=py.Callback(self.ec_gui_fun, "sourcetxt"))
py.columnLayout("tarCol", p="objRow")
self.target_field = py.textField("targetText", tx="Target Driver", p="tarCol")
py.columnLayout("tarbutCol", p="objRow")
py.button(label="<<", width=30, height=20, p="tarbutCol", bgc=(0.8, 0.8, 0.8), command=py.Callback(self.ec_gui_fun, "targettxt"))
py.frameLayout("scrollFrame", label="Driver Attributes", cll=False, borderStyle="etchedIn", p="sdkflip")
py.rowLayout("scrollRow", p="scrollFrame")
self.scroll_list = py.textScrollList("attrList", w=300, h=200, numberOfRows=8, allowMultiSelection=True, p="scrollRow")
py.rowLayout("comRow", numberOfColumns=4, p="sdkflip")
py.text("preText", l="Target Prefix", p="comRow")
self.prefix_field = py.textField("prefixText", tx="rt", w=70, p="comRow")
py.button(label="Mirror", width=80, height=30, p="comRow", bgc=(0.8, 0.8, 0.8), command=py.Callback(self.ec_sdk_flip, True))
py.button(label="Copy", width=80, height=30, p="comRow", bgc=(0.8, 0.8, 0.8), command=py.Callback(self.ec_sdk_flip, False))
py.showWindow(self.window)
示例2: ui
def ui():
columnWidth1st = 120
if pm.window('AlembicMasterUI', q=True, exists=True) : pm.deleteUI('AlembicMasterUI')
with pm.window('AlembicMasterUI',menuBar=True, s=True):
with pm.columnLayout(adj=True):
with pm.frameLayout( label='Export Alembic', mw=3, mh=3,cll=True, bs='etchedIn'):
with pm.columnLayout(adj=True):
with pm.rowLayout(nc=3, adj=2):
pm.text(label='file :', w=columnWidth1st, align='right')
pm.textField('path_TFG', text="D:/")
pm.symbolButton( image='navButtonBrowse.png', c=pm.Callback( browseIt, 'path_TFG', 0, 'Alembic (*.abc)' ) )
with pm.rowLayout(nc=2, adj=2 ):
startFrame=pm.animation.playbackOptions(q=1, minTime=1)
EndFrame=pm.animation.playbackOptions(q=1, maxTime=1)
with pm.rowLayout(nc=2, adj=2):
pm.text(l='',w=columnWidth1st)
pm.button(l='Export',bgc=(0.19,0.29,0.19),c=pm.Callback(exportScene))
pm.radioButtonGrp( 'timeRange_RBG', label='Time range :',
labelArray3=['Camera Setting','Time Slider', 'Start/End'],
numberOfRadioButtons=3,
select=1,
cw = [1,columnWidth1st],
on1=pm.Callback( callback_timerangeSelect, 1),
on2=pm.Callback( callback_timerangeSelect, 2),
on3=pm.Callback( callback_timerangeSelect, 3),
)
pm.floatFieldGrp( 'timeRange_FFG', label='Start / End : ', value1=1, value2=24, numberOfFields=2, cw = [1,117], en=False)
with pm.frameLayout( label='Rebuild Scene', mw=3, mh=3,cll=True, bs='etchedIn'):
with pm.columnLayout(adj=True):
with pm.rowLayout(nc=2, adj=2):
pm.text(l='',w=columnWidth1st)
pm.button(l='New Scene', bgc=(0.24,0.49,0.24), c=pm.Callback(buildscene))
with pm.frameLayout( label='Import Alembic', mw=3, mh=3,cll=True, bs='etchedIn'):
with pm.columnLayout(adj=True):
with pm.rowLayout(nc=3, adj=2):
pm.text(label='file :', w=columnWidth1st, align='right')
pm.textField('path_ABC2', text="D:/")
pm.symbolButton( image='navButtonBrowse.png', c=pm.Callback( browseIt, 'path_ABC2', 1, 'Alembic (*.abc)' ) )
with pm.rowLayout(nc=2, adj=2):
pm.text(l='',w=columnWidth1st)
pm.button(l='Import', bgc=(0.19,0.19,0.28), c=pm.Callback(importAbcFile))
with pm.frameLayout( label='Save Scene', mw=3, mh=3,cll=True, bs='etchedIn'):
with pm.columnLayout(adj=True):
with pm.rowLayout(nc=3, adj=2):
pm.text(label='file :', w=columnWidth1st, align='right')
pm.textField('path_TFG2', text="D:/")
pm.symbolButton( image='navButtonBrowse.png', c=pm.Callback( browseIt, 'path_TFG2', 0 ) )
with pm.rowLayout(nc=2, adj=2):
pm.text(l='',w=columnWidth1st)
pm.button(l='Save Scene', w=64, bgc=(0.22,0.23,0.43), c=pm.Callback(saveScene))
示例3: build
def build(self):
""" Build the main header and body for this view. """
with pm.frameLayout('%sHeadFrame' % self.viewName, mw=self._headMargins[0], mh=self._headMargins[1], lv=False, bv=False) as self._headFrame:
self.buildHeader()
with pm.frameLayout('%sFrame' % self.viewName, mw=self._bodyMargins[0], mh=self._bodyMargins[1], lv=False, bv=False) as self._bodyFrame:
self.buildBody()
utils.layoutForm(self._layout, (0, 1), spacing=2, vertical=True)
示例4: __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)
示例5: _gatherEvents
def _gatherEvents(self, instance):
"""event collector called once after the first Idle Event"""
message = "Gathered events by '%s':\n" % instance
# get the Id for the key
inverseID=dict(zip(self.eventID.values(),self.eventID.keys()))
# prompt Result
for Id in self.eventRecord:
token = str(" ID %4d Event: %s \n" % (Id, inverseID.get(Id,0)))
message = message + token
# --------------create new UI entry---------------
objUI = self._UIobject.createTextfieldObj(message, "eventID: %s" % inverseID.get(self.eventRecord[0],0),True)
mel.setParent(objUI)
mel.frameLayout(mw=self._optionMarginWidth,l = 'Command Inspect', collapse = True, collapsable = True)
mel.columnLayout('subCol',adj=True)
mel.separator(h=self._optionMarginWidth,style="none")
mel.scrollField(numberOfLines=3, editable=False,
wordWrap=False, h = self._optionInspectHeight, w = self._optionInspectWidth, text = "place Holder" )
mel.separator(h=self._optionMarginWidth,style="none")
# reset Event Collection
self.eventRecord = []
self.eventID["idle"] = 0
示例6: __init__
def __init__(self):
if pm.window(win, q=True, exists=True ):
pm.deleteUI(win)
with pm.window(win, wh=[300,600], t=title):
with pm.frameLayout( lv=False, cll=False, mw=1, mh=1):
with pm.formLayout() as mainForm:
# 상단
with pm.tabLayout(tv=False) as top:
with pm.frameLayout(lv=False, cll=False, mw=2, mh=2, bv=False):
with pm.rowLayout(nc=3, adj=2):
pm.image( image = shelf_icon )
pm.text(l=' %s'%title, fn='boldLabelFont', align='left')
pm.image( image = alfredIcon )
#
# Contents start ===========================================================
# 중단
with pm.tabLayout(tv=False, scr=True, childResizable=True) as self.mid:
#with pm.columnLayout(adj=True):
with pm.frameLayout( lv=False, cll=False, mw=3, mh=3, bv=False):
uiContents()
#
# Contents end =============================================================
#
# 하단
with pm.columnLayout(adj=True) as btm:
pm.helpLine()
# 팝업메뉴
# 왼쪽 마우스 클릭
pm.popupMenu(button=1, p=top)
pm.menuItem(l='Add To Shelf', c=pm.Callback( self.addToShalf ) )
# 오른쪽 마우스 클릭
pm.popupMenu(button=3, p=top)
pm.menuItem(l='Help', en=False )
# 폼조정
pm.formLayout( mainForm, e=True,
attachForm=[
(top, 'top', 3),
(top, 'left', 3),
(top, 'right', 3),
(self.mid, 'left', 3),
(self.mid, 'right', 3),
(btm, 'left', 3),
(btm, 'right', 3),
(btm, 'bottom', 3),
],
attachControl=[
(self.mid, 'top', 3, top),
(self.mid, 'bottom', 0, btm)
],
)
示例7: __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()
示例8: create
def create(self):
self.main_layout = pm.columnLayout(adjustableColumn= True, width= 400)
main_frame = pm.frameLayout( label='%s' % (self.light), collapsable= True)
pm.frameLayout( label='Light Attributes', collapsable= True)
pm.attrColorSliderGrp( at='%s.color' % (self.light), columnWidth4= [100, 75, 175, 50])
pm.attrFieldSliderGrp( at='%s.intensity' % (self.light), columnWidth4= [100, 75, 175, 50])
pm.attrFieldSliderGrp(at='%s.ambientShade' % (self.light), columnWidth4= [100, 75, 175, 50])
pm.setParent(main_frame)
pm.frameLayout(label= 'Shadows', collapsable= True)
pm.attrColorSliderGrp( at='%s.shadowColor' % (self.light),
columnWidth4= [100, 75, 175, 50])
self.check_box = pm.checkBox(label= 'Use Ray Trace Shadows',
changeCommand= pm.Callback(self.shadows))
self.shadow_radius = pm.attrFieldSliderGrp( at='%s.shadowRadius' %(self.light),
enable= False, columnWidth4= [100, 75, 175, 50])
self.shadow_rays = pm.attrFieldSliderGrp( at='%s.shadowRays' % (self.light),
enable= False, columnWidth4= [100, 75, 175, 50])
self.ray_depth = pm.attrFieldSliderGrp( at='%s.rayDepthLimit' % (self.light),
enable= False, columnWidth4= [100, 75, 175, 50])
pm.setParent(main_frame)
pm.rowColumnLayout(numberOfColumns= 2, columnWidth= [200, 200])
pm.button(label= 'Select Light', width= 200, command= pm.Callback(self.select))
pm.button(label= 'Delete UI', width= 200, command= pm.Callback(self.delete))
pm.button(label= 'Hide', command= pm.Callback(self.hide))
pm.button(label= 'Show', command= pm.Callback(self.show))
return self.main_layout
示例9: TheaEnvironmentCreateTab
def TheaEnvironmentCreateTab(self):
log.debug("TheaEnvironmentCreateTab()")
self.createGlobalsNode()
parentForm = pm.setParent(query=True)
pm.setUITemplate("attributeEditorTemplate", pushTemplate=True)
scLo = self.rendererName + "EnvScrollLayout"
if self.rendererTabUiDict.has_key('environment'):
self.rendererTabUiDict.pop('environment')
uiDict = {}
self.rendererTabUiDict['environment'] = uiDict
cb = self.TheaEnvironmentUpdateTab
with pm.scrollLayout(scLo, horizontalScrollBarThickness=0):
with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
with pm.frameLayout(label="Environment Lighting", collapsable=False):
with pm.columnLayout(self.rendererName + 'ColumnLayout', adjustableColumn=True, width=400):
self.addRenderGlobalsUIElement(attName = 'illumination', uiType = 'enum', displayName = 'Illumination', default='0', data='NoIllumination:DomeIllumination:IBLIllumination:PhysicalSkyIllumination', uiDict=uiDict, callback=cb)
self.addRenderGlobalsUIElement(attName='backgroundColor', uiType='color', displayName='Background Color', default='0.4:0.4:1.0', uiDict=uiDict)
with pm.frameLayout(label="Physical Sky", collapsable=False) as uiDict['physSkyFrame']:
with pm.columnLayout(self.rendererName + 'ColumnLayout', adjustableColumn=True, width=400):
self.addRenderGlobalsUIElement(attName = 'turbidity', uiType = 'float', displayName = 'Turbidity', default='2.5', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'ozone', uiType = 'float', displayName = 'Ozone', default='0.35', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'waterVapor', uiType = 'float', displayName = 'Water Vapour', default='2.0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'turbidityCoefficient', uiType = 'float', displayName = 'Turbidity Coeff', default='0.046', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'wavelengthExponent', uiType = 'float', displayName = 'Wavelength Exponent', default='1.3', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'albedo', uiType = 'float', displayName = 'Albedo', default='0.5', uiDict=uiDict)
with pm.frameLayout(label="Physical Sun", collapsable=False) as uiDict['physSunFrame']:
with pm.columnLayout(self.rendererName + 'ColumnLayout', adjustableColumn=True, width=400):
self.addRenderGlobalsUIElement(attName = 'sunPolarAngle', uiType = 'float', displayName = 'Sun Polar Angle', default='-1.0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'sunAzimuth', uiType = 'float', displayName = 'Sun Azimuth', default='-1.0', uiDict=uiDict)
#self.addRenderGlobalsUIElement(attName = 'sunDirection', uiType = 'vector', displayName = 'Sun Direction', default='0:0:0', uiDict=uiDict)
with pm.frameLayout(label="Time Zone", collapsable=False) as uiDict['timeZoneFrame']:
with pm.columnLayout(self.rendererName + 'ColumnLayout', adjustableColumn=True, width=400):
self.addRenderGlobalsUIElement(attName = 'latitude', uiType = 'float', displayName = 'Latitude', default='0.0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'longitude', uiType = 'float', displayName = 'Longitude', default='0.0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'timezone', uiType = 'int', displayName = 'Timezone', default='0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'date', uiType = 'string', displayName = 'Date', default='"1/6/2014"', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'localtime', uiType = 'string', displayName = 'Localtime', default='"12:00:00"', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'ior', uiType = 'float', displayName = 'IOR', default='1.0', uiDict=uiDict)
with pm.frameLayout(label="IBL", collapsable=False) as uiDict['iblFrame']:
with pm.columnLayout(self.rendererName + 'ColumnLayout', adjustableColumn=True, width=400):
self.addRenderGlobalsUIElement(attName = 'illuminationMap', uiType = 'color', displayName = 'Illumination Map', default='0:0:0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'backgroundMap', uiType = 'color', displayName = 'Background Map', default='0:0:0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'reflectionMap', uiType = 'color', displayName = 'Reflection Map', default='0:0:0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'RefractionMap', uiType = 'color', displayName = 'Refraction Map', default='0:0:0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'medium', uiType = 'message', displayName = 'Medium', default='', uiDict=uiDict)
# self.addRenderGlobalsUIElement(attName='useSunLightConnection', uiType='bool', displayName='Use Sun', uiDict=uiDict)
# buttonLabel = "Create Sun"
# suns = pm.ls("CoronaSun")
# if len(suns) > 0:
# buttonLabel = "Delete Sun"
# uiDict['sunButton'] = pm.button(label=buttonLabel, command=self.editSun)
pm.setUITemplate("attributeEditorTemplate", popTemplate=True)
pm.formLayout(parentForm, edit=True, attachForm=[ (scLo, "top", 0), (scLo, "bottom", 0), (scLo, "left", 0), (scLo, "right", 0) ])
self.TheaEnvironmentUpdateTab()
示例10: createUISet
def createUISet(self):
self._childLayout = pm.columnLayout( adj=True )
with self._childLayout:
pm.text(l="Click cage mesh first, then shift+click target mesh, and click the menu item.")
# cageDeformer specific
deformers = pm.ls(type=deformerTypes[0])
for node in deformers:
frameLayout = pm.frameLayout( label=node.name(), collapsable = True)
with frameLayout:
self.createCommonAttr(node)
# cageDeformerARAP specific
deformers = pm.ls(type=deformerTypes[1])
for node in deformers:
frameLayout = pm.frameLayout( label=node.name(), collapsable = True)
with frameLayout:
self.createCommonAttr(node)
with pm.rowLayout(numberOfColumns=3) :
pm.attrControlGrp( label="constraint mode", attribute= node.ctm)
pm.attrFieldSliderGrp( label="constraint weight", min=1e-10, max=1000, attribute=node.cw)
pm.attrFieldSliderGrp(label="constraint radius", min=0.001, max=10.0, attribute=node.cr)
with pm.rowLayout(numberOfColumns=3) :
pm.attrFieldSliderGrp( label="iteration", min=1, max=20, attribute=node.it)
pm.attrControlGrp( label="tet mode", attribute= node.tm)
pm.attrFieldSliderGrp( label="translation weight", min=0.0, max=1.0, attribute=node.tw)
示例11: layersReplace
def layersReplace(self, attribute):
if attribute is not "none":
self.thisNode = pm.PyNode(attribute).node()
log.debug("layersReplace {0}".format(attribute))
pm.setUITemplate("attributeEditorTemplate", pushTemplate=True)
materialEntries = self.thisNode.materialEntryMtl.numElements()
#print "layersReplace: node has ", self.thisNode.materialEntryMtl.numElements(), "layers"
if self.layersUi is not None and pm.columnLayout(self.layersUi, q=True, exists=True):
pm.deleteUI(self.layersUi)
with pm.columnLayout(adj=True, parent=self.uiParent) as self.layersUi:
for layerNumber in range(materialEntries):
layerIndex = self.thisNode.materialEntryMtl.elementByPhysicalIndex(layerNumber).index()
with pm.frameLayout(label="Layer {0}".format(layerNumber), collapsable=True, collapse=False, bv=True) as fl:
log.debug("create layers UI {0}".format(self.thisNode.materialEntryMtl[layerIndex]))
with pm.columnLayout(adj=True):
attribute = self.thisNode.materialEntryMtl[layerIndex]
if attribute.isConnected():
pm.frameLayout(fl, edit=True, label=attribute.inputs(p=1)[0])
pm.attrColorSliderGrp(label="Material", at=attribute)
attribute = self.thisNode.materialEntryMsk[layerIndex]
pm.attrFieldSliderGrp(label="Mask", at=attribute)
attribute = self.thisNode.materialEntryMode[layerIndex]
pm.attrEnumOptionMenuGrp(label="Mode", at=attribute)
with pm.columnLayout(adj=True):
pm.button(label="Remove Layer", c=pm.Callback(self.removeLayer, layerIndex), height=18)
pm.button(label="Layer Up", c=pm.Callback(self.moveLayerUp, layerIndex), height=18)
pm.button(label="Layer Down", c=pm.Callback(self.moveLayerDown, layerIndex), height=18)
pm.setUITemplate("attributeEditorTemplate", popTemplate=True)
示例12: uiContents
def uiContents():
with pm.frameLayout(l='Export To AE Tools', cll=True, mw=3, mh=3, bs='etchedIn'):
with pm.columnLayout(adj=True):
with pm.rowLayout(nc=10):
pm.text(l='Create Static Null : ', w=labelWidth, align='right')
pm.button(l='Select Transform and Excute', c=pm.Callback( btn_createStaticNull ), w=160)
#pm.button(l='d', w=20, c=pm.Callback( pm.launch, web="http://www.braverabbit.de/playground/dp=443") )
#pm.button(l='t', w=20, c=pm.Callback( pm.launch, web="https://www.youtube.com/watch?v=YvNdYseSNFs") )
#pm.button(l='t', w=20, c=pm.Callback( excuteWindowFile, 'alembicExporter.flv') )
with pm.rowLayout(nc=10):
pm.text(l='Create Active Null : ', w=labelWidth, align='right')
pm.button(l='Select Transform and Excute', c=pm.Callback( btn_createActiveNull ), w=160)
#pm.button(l='d', w=20, c=pm.Callback( pm.launch, web="http://www.braverabbit.de/playground/dp=443") )
#pm.button(l='t', w=20, c=pm.Callback( pm.launch, web="https://www.youtube.com/watch?v=YvNdYseSNFs") )
#pm.button(l='t', w=20, c=pm.Callback( excuteWindowFile, 'alembicExporter.flv') )
with pm.rowLayout(nc=10):
pm.text(l='Create aeCamera : ', w=labelWidth, align='right')
pm.button(l='Select Camera and Excute', c=pm.Callback( btn_createAECam ), w=160)
#pm.button(l='d', w=20, c=pm.Callback( pm.launch, web="http://www.braverabbit.de/playground/dp=443") )
#pm.button(l='t', w=20, c=pm.Callback( pm.launch, web="https://www.youtube.com/watch?v=YvNdYseSNFs") )
#pm.button(l='t', w=20, c=pm.Callback( excuteWindowFile, 'alembicExporter.flv') )
with pm.frameLayout(l='Support Tools', cll=True, mw=3, mh=3, bs='etchedIn'):
with pm.columnLayout(adj=True):
with pm.rowLayout(nc=10):
pm.text(l='PrimaryVis : ', w=labelWidth, align='right')
pm.button(l='OFF', c=pm.Callback( btn_primaryVisibilityOff ), w=160)
示例13: toggle_vis
def toggle_vis(self):
value = pm.frameLayout(self.layout, query= True, visible= True)
if value == True:
pm.frameLayout(self.layout, edit= True, visible= False)
if value == False:
pm.frameLayout(self.layout, edit= True, visible= True)
示例14: createUISet
def createUISet(self):
self._childLayout = pm.columnLayout( adj=True )
with self._childLayout:
pm.text(l="Click cage mesh first, then shift+click target mesh, and click the menu item.")
self.deformers = pm.ls(type="cage")
for i in range(len(self.deformers)):
frameLayout = pm.frameLayout( label=self.deformers[i].name(), collapsable = True)
with frameLayout:
with pm.rowLayout(numberOfColumns=3) :
pm.button( l="Del", c=pm.Callback( self.deleteNode, self.deformers[i].name()))
pm.attrControlGrp( label="cage mode", attribute= self.deformers[i].cgm)
pm.attrControlGrp( label="blend mode", attribute= self.deformers[i].bm)
with pm.rowLayout(numberOfColumns=3) :
pm.attrControlGrp( label="rotation consistency", attribute= self.deformers[i].rc)
pm.attrControlGrp( label="Frechet sum", attribute= self.deformers[i].fs)
self.deformers = pm.ls(type="cageARAP")
for i in range(len(self.deformers)):
frameLayout = pm.frameLayout( label=self.deformers[i].name(), collapsable = True)
with frameLayout:
with pm.rowLayout(numberOfColumns=4) :
pm.button( l="Del", c=pm.Callback( self.deleteNode, self.deformers[i].name()))
pm.attrControlGrp( label="cage mode", attribute= self.deformers[i].cgm)
pm.attrControlGrp( label="blend mode", attribute= self.deformers[i].bm)
pm.attrControlGrp( label="constraint mode", attribute= self.deformers[i].constraintMode)
with pm.rowLayout(numberOfColumns=3) :
pm.attrControlGrp( label="rotation consistency", attribute= self.deformers[i].rc)
pm.attrControlGrp( label="Frechet sum", attribute= self.deformers[i].fs)
pm.attrControlGrp( label="constraint weight", attribute= self.deformers[i].constraintWeight)
示例15: scriptWindow
def scriptWindow( document ):
win = pm.window( title='Sniplet', wh=(700,300))
pm.frameLayout(labelVisible=False, borderVisible=False)
# -----------------------------------------------
pm.cmdScrollFieldExecuter( sourceType="python", text=document )
# -----------------------------------------------
pm.showWindow(win)