本文整理汇总了Python中pymel.core.floatFieldGrp函数 的典型用法代码示例。如果您正苦于以下问题:Python floatFieldGrp函数的具体用法?Python floatFieldGrp怎么用?Python floatFieldGrp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了floatFieldGrp函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: KrayRendererUpdateTab
def KrayRendererUpdateTab(self, dummy=None):
self.createGlobalsNode()
#self.updateEnvironment()
log.debug("KrayRendererUpdateTab()")
sDict = self.rendererTabUiDict['sampling']
sType = self.renderGlobalsNode.samplingType.get()
if sType != 1: #grid
pm.intFieldGrp(sDict['gridSize'], edit=True, enable=False)
pm.checkBoxGrp(sDict['gridRotate'], edit=True, enable=False)
else:
pm.intFieldGrp(sDict['gridSize'], edit=True, enable=True)
pm.checkBoxGrp(sDict['gridRotate'], edit=True, enable=True)
fType = self.renderGlobalsNode.filtertype.get()
if fType in [4, 5, 6]:
pm.floatFieldGrp(sDict['filterSize'], edit=True, enable=False)
else:
pm.floatFieldGrp(sDict['filterSize'], edit=True, enable=True)
iFormat = self.renderGlobalsNode.imageFormat.get()
if iFormat in [2, 3]:
pm.attrEnumOptionMenuGrp(sDict['bitdepth'], edit=True, enable=True)
else:
pm.attrEnumOptionMenuGrp(sDict['bitdepth'], edit=True, enable=False)
if iFormat == 1:
pm.intFieldGrp(sDict['jpgQuality'], edit=True, enable=True)
else:
pm.intFieldGrp(sDict['jpgQuality'], edit=True, enable=False)
开发者ID:MassW, 项目名称:OpenMaya, 代码行数:31, 代码来源:mtkr_initialize.py
示例2: addUIElement
def addUIElement(self, uiType, attribute, uiLabel, callback):
ui = None
if uiType == 'bool':
ui = pm.checkBoxGrp(label=uiLabel)
if callback is not None:
pm.checkBoxGrp(ui, edit=True, cc=callback)
if uiType == 'int':
ui = pm.intFieldGrp(label=uiLabel, numberOfFields = 1)
if callback is not None:
pm.intFieldGrp(ui, edit=True, cc = callback)
if uiType == 'float':
ui = pm.floatFieldGrp(label=uiLabel, numberOfFields = 1)
if callback is not None:
pm.floatFieldGrp(ui, edit=True, cc= callback)
if uiType == 'enum':
ui = pm.attrEnumOptionMenuGrp(label = uiLabel, at=attribute, ei = self.getEnumList(attribute))
# attrEnumOptionGrp has no cc callback, so I create a script job
if callback is not None:
attribute = pm.Attribute(self.renderGlobalsNodeName + "." + attribute)
pm.scriptJob(attributeChange=[attribute, callback], parent=ui)
if uiType == 'color':
ui = pm.attrColorSliderGrp(label=uiLabel, at=attribute)
if uiType == 'string':
ui = pm.textFieldGrp(label=uiLabel)
if callback is not None:
pm.textFieldGrp(ui, edit=True, cc=callback)
return ui
开发者ID:UIKit0, 项目名称:OpenMaya, 代码行数:27, 代码来源:__init__.py
示例3: 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))
开发者ID:kyuhoChoi, 项目名称:mayaTools, 代码行数:60, 代码来源:AlembicMasterExporter_old.py
示例4: binMeshTranslatorOpts
def binMeshTranslatorOpts(parent, action, initialSettings, resultCallback):
print "Parent", parent
print "Action", action
print "InitialSettings", initialSettings
print "ResultCallback", resultCallback
useTransform = True
oneFilePerMesh = False
createProxies = True
proxyRes = 0.1
exportDir = ""
if initialSettings is not None and len(initialSettings) > 0:
#oneFilePerMesh=0;createProxies=1;proxyRes=0.1;exportDir=;createProxies=1
opts = initialSettings.split(";")
for opt in opts:
name, value = opt.split("=")
if name == "oneFilePerMesh":
oneFilePerMesh = int(value)
if name == "createProxies":
createProxies = int(value)
if name == "useTransform":
useTransform = int(value)
if name == "proxyRes":
proxyRes = float(proxyRes)
if action == "post":
print "post action"
pm.setParent(parent)
with pm.columnLayout(adj = True):
pm.checkBox("MSH_OPTS_DOTRANSFORM", label = "Use Transform", v=useTransform)
pm.checkBox("MSH_OPTS_ONEFILE", label = "One File Per Mesh", v=oneFilePerMesh)
pm.checkBox("MSH_OPTS_DOPROX", label = "Create ProxyFiles", v=createProxies)
pm.floatFieldGrp("MSH_OPTS_PROXPERC", label="Proxy Resolution", v1 = proxyRes)
#pm.textFieldGrp("MSH_OPTS_PATH", label="ExportDir:", text=exportDir)
if action == "query":
resultOptions = ""
print "Query action"
oneFilePerMesh = pm.checkBox("MSH_OPTS_ONEFILE", query=True, v=True)
resultOptions += "oneFilePerMesh={0}".format(int(oneFilePerMesh))
doProx = pm.checkBox("MSH_OPTS_DOPROX", query=True, v=True)
resultOptions += ";createProxies={0}".format(int(doProx))
proxyRes = pm.floatFieldGrp("MSH_OPTS_PROXPERC", query=True, v1 = True)
resultOptions += ";proxyRes={0}".format(proxyRes)
#exportDir = pm.textFieldGrp("MSH_OPTS_PATH", query=True, text = True)
#resultOptions += ";exportDir='{0}'".format(exportDir)
doTransform = pm.checkBox("MSH_OPTS_DOTRANSFORM", query=True, v=True)
resultOptions += ";useTransform={0}".format(int(doTransform))
melCmd = '{0} "{1}"'.format(resultCallback,resultOptions)
pm.mel.eval(melCmd)
return 1
开发者ID:MassW, 项目名称:OpenMaya, 代码行数:55, 代码来源:binMeshTranslator.py
示例5: create
def create(self):
if pm.window(self.window, exists=True):
pm.deleteUI(self.window)
pm.window(self.window, t=self.title)
# source & targets
pm.rowColumnLayout(nc=3,cal=[(1,'right')], cw=[(1,80),(2,200),(3,100)])
pm.text(l='Source: ')
self.sourceObjTf = pm.textField()
pm.button(l='Select', c=self.selectSource)
pm.text(l='Target(s): ')
self.targetObjsTf = pm.textField()
pm.button(l='Select', c=self.selectTarget)
pm.setParent('..')
# number
pm.rowColumnLayout(w=self.size[0])
self.copyNum = pm.intSliderGrp(l='Copies: ', v=10, cw3=[80,80,220],
min=1, max=500, fmx=5000, f=True)
pm.separator(h=10, st='in')
# rotation
pm.rowColumnLayout(nc=2, cal=[(1,'right')], cw=[(1,80), (2,300)])
pm.text(l='Rotation: ')
self.rotationModeRC = pm.radioCollection()
self.rotBtnFixed = pm.radioButton(l='Fixed', sl=True)
pm.text(l='')
self.rotBtnAlign = pm.radioButton(l='Align with Target')
pm.text(l='')
self.rotBtnRand = pm.radioButton(l='Random',
onc=lambda *args: self.rotationRange.setEnable(True),
ofc=lambda *args: self.rotationRange.setEnable(False))
pm.setParent('..')
self.rotationRange = pm.floatFieldGrp(l='Range: ', nf=3, v1=30, v2=30, v3=30,
cw4=[80,100,100,100], en=False)
pm.separator(h=10, st='in')
# scale
pm.rowColumnLayout(nc=2, cal=[(1,'right')], cw=[(1,80), (2,300)])
pm.text(l='Scale: ')
self.scaleModeRC = pm.radioCollection()
self.scaleBtnFixed = pm.radioButton(l='Fixed', sl=True)
pm.text(l='')
self.scaleBtnRand = pm.radioButton(l='Random',
onc=lambda *args: self.scaleRange.setEnable(True),
ofc=lambda *args: self.scaleRange.setEnable(False))
pm.setParent( '..' )
self.scaleRange = pm.floatFieldGrp(l='Min Max: ', nf=2, v1=1, v2=1,
cw3=[80,100,100], en=False)
pm.separator(h=10, st='in')
# disperse button
pm.button(l='Disperse', c=self.disperse, w=380, al='center')
pm.showWindow(self.window)
开发者ID:sundae24, 项目名称:Maya, 代码行数:55, 代码来源:Disperser.py
示例6: exportScene
def exportScene():
filePath= pm.textField('path_TFG', q=True, text=True )
#pm.selected()
#directory = 'C:/Users/Administrator/Desktop/alembic/'
#fileName = 'B_02'
deleteUnknownNodes()
print u'"%s" 로 출력됩니다.' % filePath
startFrame = pm.floatFieldGrp( 'timeRange_FFG', q=True, value1=True )
endFrame = pm.floatFieldGrp( 'timeRange_FFG', q=True, value2=True )
export( filePath, startFrame, endFrame, 1 )
开发者ID:kyuhoChoi, 项目名称:mayaTools, 代码行数:11, 代码来源:AlembicMasterExporter_old.py
示例7: KrayFinalGatheringCreateTab
def KrayFinalGatheringCreateTab(self):
log.debug("KrayFinalGatheringCreateTab()")
self.createGlobalsNode()
parentForm = pm.setParent(query=True)
pm.setUITemplate("attributeEditorTemplate", pushTemplate=True)
scLo = self.rendererName + "PhotonsScrollLayout"
with pm.scrollLayout(scLo, horizontalScrollBarThickness=0):
with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
with pm.frameLayout(label="Photons frame", collapsable=True, collapse=False):
with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
ui = pm.floatFieldGrp(label="Threshold:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgThreshold", index=2)
pm.separator()
ui = pm.intFieldGrp(label="Min Rays:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgMinRays", index=2)
ui = pm.intFieldGrp(label="Max Rays:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgMaxRays", index=2)
ui = pm.floatFieldGrp(label="Prerender:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgPrerender", index=2)
ui = pm.intFieldGrp(label="Passes:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgPasses", index=2)
pm.separator()
ui = pm.floatFieldGrp(label="Sploth Detect:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgSplotchDetect", index=2)
ui = pm.floatFieldGrp(label="Sensitivity:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgSensitivity", index=2)
pm.separator()
ui = pm.checkBoxGrp(label="FG Reflections:", value1=False)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgReflections", index=2)
ui = pm.checkBoxGrp(label="FG Refractions:", value1=False)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgRefractions", index=2)
pm.separator()
ui = pm.floatFieldGrp(label="Spatial Tolerance:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgSpatialTolerance", index=2)
ui = pm.floatFieldGrp(label="Angular Tolerance:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgAngularTolerance", index=2)
ui = pm.floatFieldGrp(label="FG Min Dist:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgDistMin", index=2)
ui = pm.floatFieldGrp(label="FG Dist Max:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgDistMax", index=2)
ui = pm.floatFieldGrp(label="Density/Brightness:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgBrightness", index=2)
pm.separator()
ui = pm.intFieldGrp(label="Path Passes:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgPathPasses", index=2)
ui = pm.floatFieldGrp(label="Corner Dist:", numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgCornerDist", index=2)
ui = pm.checkBoxGrp(label="Show Samples:", value1=False)
pm.connectControl(ui, self.renderGlobalsNodeName + ".fgShowSamples", index=2)
pm.setUITemplate("attributeEditorTemplate", popTemplate=True)
pm.formLayout(parentForm, edit=True, attachForm=[ (scLo, "top", 0), (scLo, "bottom", 0), (scLo, "left", 0), (scLo, "right", 0) ])
开发者ID:MassW, 项目名称:OpenMaya, 代码行数:52, 代码来源:mtkr_initialize.py
示例8: getModuleInstance
def getModuleInstance(self):
baseNameT = pm.textFieldGrp(self.baseNameT,q = 1,text = 1)
sideT = pm.textFieldGrp(self.sideT,q = 1,text = 1)
cntAxisT = pm.textFieldGrp(self.cntAxisT,q = 1,text = 1)
cntSizeBodyV = pm.floatFieldGrp(self.cntSizeBody,q = 1,value1 = 1)
cntSizeIkV = pm.floatFieldGrp(self.cntSizeIk,q = 1,value1 = 1)
segmentN = pm.intFieldGrp(self.segment,q = 1,v = 1)
mainMetaNode = pm.optionMenu(self.mainMetaNodeM,q = 1,v = 1)
self.__pointerClass = SpineModule(baseName = baseNameT,side = sideT,bodySize = cntSizeBodyV,ctrlAxis = cntAxisT,
ikSize = cntSizeIkV,segment = segmentN,metaMain = mainMetaNode)
return self.__pointerClass
开发者ID:RyugasakiHu, 项目名称:AT_Rigging, 代码行数:13, 代码来源:spineModule.py
示例9: main
def main( *args ):
if( pm.window('selInvertNormalFace', exists=True) ):
pm.deleteUI('selInvertNormalFace')
uiLayout['window'] = pm.window('selInvertNormalFace', menuBar=True, title='select face with invert normal', sizeable=False, h=60, w=180)
uiLayout['mainLayout'] = pm.columnLayout(columnAlign='left', columnAttach=['left', 0] )
pm.floatFieldGrp( 'valDir', numberOfFields=3, label='Direction:', value1=0.0, value2=1.0, value3=0.0, cw4=[ 50, 30, 30, 30 ], parent=uiLayout['mainLayout'] )
uiLayout['ui_sub1'] = pm.rowColumnLayout( w=180, nc=2, cw=[(1, 85), ( 2,80 ) ], parent=uiLayout['mainLayout'] )
pm.floatFieldGrp( 'valOffset', numberOfFields=1, label='Offset:', value1=0.5, cw2=[ 50, 30 ], parent=uiLayout['ui_sub1'] )
pm.button( label=' Select Face! ', ebg=True, c=doSelInvNRMFace, parent=uiLayout['ui_sub1'] )
pm.showWindow( uiLayout['window'] )
开发者ID:kzchen, 项目名称:Maya_TD_tools, 代码行数:14, 代码来源:(+out-of-dated+)autoSelReverseNRM_v0.6.py
示例10: 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)
开发者ID:dictoon, 项目名称:appleseed-maya, 代码行数:28, 代码来源:appleseedmenu.py
示例11: MakeVectorField
def MakeVectorField(vectorAttribute, annotation=None):
"""
Creates & returns an input field, linked to given Vector3Attribute, which allows user to input x,y,z values.
:param vectorAttribute: Vector3Attribute instance.
:param annotation: toolTip annotation, or None.
"""
if(not isinstance(vectorAttribute, at.Vector3Attribute)):
raise TypeError("Expected %s, got %s" % (at.Vector3Attribute, type(vectorAttribute)))
rowLayout = MakeRowLayout(2)
MakeText(vectorAttribute.attributeLabel, annotation)
vectorField = pm.floatFieldGrp(numberOfFields=3, precision=3, columnWidth3=(__MIDDLE_COLUMN_WIDTH__, __MIDDLE_COLUMN_WIDTH__, __MIDDLE_COLUMN_WIDTH__),
value1=vectorAttribute.x, value2=vectorAttribute.y, value3=vectorAttribute.z)
vectorField.changeCommand(lambda *args: vectorAttribute._setValue(vectorField.getValue()))
vectorAttribute.updateUiCommand = (lambda *args: vectorField.setValue((vectorAttribute.x, vectorAttribute.y, vectorAttribute.z, 0.0)))
vectorAttribute.uiEnableMethod = vectorField.setEnable
if(annotation is not None):
vectorField.setAnnotation(annotation)
elif(vectorAttribute.annotation is not None):
vectorField.setAnnotation(vectorAttribute.annotation)
SetAsChildLayout(rowLayout)
return vectorField
开发者ID:joemuers, 项目名称:pyswarm, 代码行数:26, 代码来源:uiBuilder.py
示例12: getModuleInstance
def getModuleInstance(self):
cName = pm.textFieldGrp(self.cNameT,q = 1,text = 1)
side = pm.textFieldGrp(self.sideT,q = 1,text = 1)
cntSizeV = pm.floatFieldGrp(self.cntSize,q = 1,value1 = 1)
self.__pointerClass = Hierarchy(side,size = cntSizeV,characterName = cName)
return self.__pointerClass
开发者ID:RyugasakiHu, 项目名称:AT_Rigging, 代码行数:8, 代码来源:hierarchy.py
示例13: dimConnections
def dimConnections(element):
print "DimConnections"
if element['name'] in ['motionblur']:
value = pm.checkBoxGrp( element['name'], query = True, v1 = True)
print element['uielement']
valueInv = value
#groups = mantraGlobalsAttributes.mantraGlobalsAttributes
#if el['name'] in ['xftimesamples', 'geotimesamples', 'motionfactor', 'mbtype']:
if value:
print "enabling ctrls"
else:
print "disabling ctrls"
pm.intFieldGrp('xftimesamples', edit = True, enable = valueInv)
pm.intFieldGrp('geotimesamples', edit = True, enable = valueInv)
pm.floatFieldGrp('motionfactor', edit = True, enable = valueInv)
pm.attrEnumOptionMenu('mbtype', edit = True, enable = valueInv)
pm.checkBoxGrp('imagemotionblur', edit = True, enable = valueInv)
开发者ID:MassW, 项目名称:OpenMaya, 代码行数:17, 代码来源:mtm_initialize.py
示例14: AppleseedEnvironmentCreateTab
def AppleseedEnvironmentCreateTab(self):
self.createGlobalsNode()
parentForm = pm.setParent(query=True)
pm.setUITemplate("attributeEditorTemplate", pushTemplate=True)
scLo = self.rendererName + "AOScrollLayout"
envDict = {}
self.rendererTabUiDict['environment'] = envDict
uiDict = envDict
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):
attr = pm.Attribute(self.renderGlobalsNodeName + ".environmentType")
envDict['environmentType'] = pm.attrEnumOptionMenuGrp(label="Environment Type", at=self.renderGlobalsNodeName + ".environmentType", ei=self.getEnumList(attr))
with pm.frameLayout(label="Environment Colors", collapsable=False) as envDict['commonEnvFrame']:
with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
ui = pm.floatFieldGrp(label="Environment Intensity:", value1=1.0, numberOfFields=1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".environmentIntensity", index=2)
envDict['environmentColor'] = pm.attrColorSliderGrp(label="Environment Color:", at=self.renderGlobalsNodeName + ".environmentColor")
envDict['gradientHorizon'] = pm.attrColorSliderGrp(label="Gradient Horizon Color:", at=self.renderGlobalsNodeName + ".gradientHorizon")
envDict['gradientZenit'] = pm.attrColorSliderGrp(label="Gradient Zenith Color:", at=self.renderGlobalsNodeName + ".gradientZenit")
envDict['environmentMap'] = pm.attrColorSliderGrp(label="Environment Map:", at=self.renderGlobalsNodeName + ".environmentMap")
self.addRenderGlobalsUIElement(attName='latlongHoShift', uiType='float', displayName='Lat-Long Horizontal Shift:', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName='latlongVeShift', uiType='float', displayName='Lat-Long Vertical Shift:', uiDict=uiDict)
with pm.frameLayout(label="Physical Sky", collapsable=False) as envDict['pysSkyFrame']:
with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
attr = pm.Attribute(self.renderGlobalsNodeName + ".skyModel")
envDict['pskModel'] = pm.attrEnumOptionMenuGrp(label="Sky Model:", at=self.renderGlobalsNodeName + ".skyModel", ei=self.getEnumList(attr))
uiDict['sunLightOptionMenu'] = pm.optionMenuGrp(label="Sun Light:", changeCommand=self.updateSunLightOptionMenu)
envDict['pskGrAlbedo'] = pm.floatFieldGrp(label="Ground Albedo:", value1=1.0, numberOfFields=1)
pm.connectControl(envDict['pskGrAlbedo'], self.renderGlobalsNodeName + ".ground_albedo", index=2)
envDict['pskGrHShit'] = pm.floatFieldGrp(label="Horizon Shift:", value1=1.0, numberOfFields=1)
pm.connectControl(envDict['pskGrHShit'], self.renderGlobalsNodeName + ".horizon_shift", index=2)
envDict['pskLumMulti'] = pm.floatFieldGrp(label="Luminance Multiplier:", value1=1.0, numberOfFields=1)
pm.connectControl(envDict['pskLumMulti'], self.renderGlobalsNodeName + ".luminance_multiplier", index=2)
envDict['pskSatMulti'] = pm.floatFieldGrp(label="Saturation Multiplier:", value1=1.0, numberOfFields=1)
pm.connectControl(envDict['pskSatMulti'], self.renderGlobalsNodeName + ".saturation_multiplier", index=2)
envDict['pskTurb'] = pm.floatFieldGrp(label="Turbidity:", value1=1.0, numberOfFields=1)
pm.connectControl(envDict['pskTurb'], self.renderGlobalsNodeName + ".turbidity", index=2)
envDict['pskTurbMin'] = pm.floatFieldGrp(label="Turbidity Min:", value1=1.0, numberOfFields=1)
pm.connectControl(envDict['pskTurbMin'], self.renderGlobalsNodeName + ".turbidity_min", index=2)
envDict['pskTurbMax'] = pm.floatFieldGrp(label="Turbidity Max:", value1=1.0, numberOfFields=1)
pm.connectControl(envDict['pskTurbMax'], self.renderGlobalsNodeName + ".turbidity_max", index=2)
with pm.frameLayout(label="OSL", collapsable=False) as envDict['oslFrame']:
with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn=True, width=400):
envDict['environmentOSL'] = pm.attrColorSliderGrp(label="OSL Background", at=self.renderGlobalsNodeName + ".environmentOSL")
pm.setUITemplate("attributeEditorTemplate", popTemplate=True)
pm.formLayout(parentForm, edit=True, attachForm=[ (scLo, "top", 0), (scLo, "bottom", 0), (scLo, "left", 0), (scLo, "right", 0) ])
pm.scriptJob(attributeChange=[self.renderGlobalsNode.environmentType, pm.Callback(self.uiCallback, tab="environment")])
pm.scriptJob(attributeChange=[self.renderGlobalsNode.skyModel, pm.Callback(self.uiCallback, tab="environment")])
self.updateEnvironment()
开发者ID:dictoon, 项目名称:appleseed-maya, 代码行数:55, 代码来源:initialize.py
示例15: setValue
def setValue(self, value):
if value == "stdingfilename":
self.fileName = pm.textFieldButtonGrp("stdingfilename", query=True, text=True)
if value == "stdinshowpoints":
self.showPoints = pm.checkBoxGrp("stdinshowpoints", query=True, value1=True)
if value == "stdinptdensity":
self.density = pm.floatFieldGrp("stdinptdensity", query=True, value1=True)
if value == "stdinptsize":
self.pointSize = pm.intFieldGrp("stdinptsize", query=True, value1=True)
开发者ID:MassW, 项目名称:OpenMaya, 代码行数:9, 代码来源:mtm_initialize.py
示例16: create
def create(self, stationary_count, offset_count):
'''
Create the fgshooter window.
'''
if pm.window(self.window_name, exists=True):
pm.deleteUI(self.window_name)
pm.window(self.window_name, title=self.window_title)
main_form = pm.formLayout(numberOfDivisions=2)
self.column = pm.columnLayout(adjustableColumn=True)
# Render Camera
self.render_camera_field = pm.checkBoxGrp(label="Include Render Camera", value1=self.render_camera, changeCommand=self.updateRenderCamera)
# Stationary Cameras
pm.separator(height=20, style="in")
pm.rowLayout(numberOfColumns=3, columnWidth3=(140, 80, 80), columnAlign=(1, 'right'), columnAttach3=("right", "both", "both"))
pm.text("Stationary Cameras")
self.stationary_field = pm.intField(value=stationary_count)
pm.button(label="Update", height=22, command=self.update)
pm.setParent('..')
self.stationary = []
i = 0
while i < stationary_count:
self.stationary.append(pm.floatFieldGrp(value1=self.stationary_frames[i], label="frame"))
i += 1
# Offset Cameras
pm.separator(height=20, style="in")
pm.rowLayout(numberOfColumns=3, columnWidth3=(140, 80, 80), columnAlign=(1, 'right'), columnAttach3=("right", "both", "both"))
pm.text("Offset Cameras")
self.offset_field = pm.intField(value=offset_count)
pm.button(label="Update", height=22, command=self.update)
pm.setParent('..')
self.offset = []
i = 0
while i < offset_count:
self.offset.append(pm.intFieldGrp(value1=self.offset_frames[i], label="frame offset"))
i += 1
pm.setParent('..')
# remove/apply buttons
self.remove_button = pm.button(label="Remove All", height=30, command=self.remove)
self.apply_button = pm.button(label="Apply / Refresh", height=30, command=self.apply)
pm.formLayout(main_form, edit=True, attachForm=[(self.column, "top", 2),(self.column, "left", 2),(self.column, "right", 2), (self.remove_button, "bottom", 2), (self.remove_button, "left", 2), (self.apply_button, "bottom", 2), (self.apply_button, "right", 2)], attachControl=(self.remove_button, "right", 1, self.apply_button), attachPosition=[ (self.remove_button, "right", 0, 1), (self.apply_button, "left", 1, 1)] )
pm.setParent('..')
pm.showWindow()
开发者ID:Bumpybox, 项目名称:Tapp, 代码行数:54, 代码来源:fgshooter.py
示例17: __init__
def __init__(self):
self.title = "Mantra Standin"
self.fileName = ""
self.density = .3
self.pointSize = 1
self.showPoints = False
self.boundingBox = [-.5, -.5, -.5, .5, .5, .5]
pm.setUITemplate("DefaultTemplate", pushTemplate=True)
self.height = 500
with pm.frameLayout(collapsable=False, labelVisible=False) as frame:
pm.textFieldButtonGrp("stdingfilename", label="GeoFileName", text="", buttonLabel="Select", bc=pm.Callback(self.selectGeoFile), cc=pm.Callback(self.setValue, "stdingfilename"))
#string $b = `symbolButton -image "navButtonBrowse.xpm" browser`;
with pm.frameLayout(collapsable=False, label="Points"):
pm.checkBoxGrp("stdinshowpoints", label="Show Points", value1=False, cc=pm.Callback(self.setValue, "stdinshowpoints"))
pm.floatFieldGrp("stdinptdensity", label="PointDensity", value1=0.3, cc=pm.Callback(self.setValue, "stdinptdensity"))
pm.intFieldGrp("stdinptsize", label="PointSize", value1=1, cc=pm.Callback(self.setValue, "stdinptsize"))
with pm.rowLayout(nc=2):
pm.button(label="Create Standin", c=pm.Callback(self.createStandin))
pm.button(label="Cancel", c=pm.Callback(self.delete))
self.show()
开发者ID:MassW, 项目名称:OpenMaya, 代码行数:21, 代码来源:mtm_initialize.py
示例18: uiCreate
def uiCreate(self):
self.uiClose()
self.window = pm.window(
WIN_NAME,
title=SCRIPT_NAME,
maximizeButton=False
)
with self.window:
with pm.formLayout() as ui_LAY_mainForm:
with pm.scrollLayout(childResizable=True) as ui_LAY_mainScroll:
with pm.frameLayout(
label='Parameters',
collapsable=True,
marginHeight=3,
borderStyle='etchedIn',
borderVisible=True,
collapse=False
):
with pm.columnLayout(adjustableColumn=True, columnOffset=('both', 2)):
self.ui_FLTFLDGRP_xPos = pm.floatFieldGrp(numberOfFields=1, label='+X', precision=6)
self.ui_FLTFLDGRP_xNeg = pm.floatFieldGrp(numberOfFields=1, label='-X', precision=6)
self.ui_FLTFLDGRP_yPos = pm.floatFieldGrp(numberOfFields=1, label='+Y', precision=6)
self.ui_FLTFLDGRP_yNeg = pm.floatFieldGrp(numberOfFields=1, label='-Y', precision=6)
self.ui_FLTFLDGRP_zPos = pm.floatFieldGrp(numberOfFields=1, label='+Z', precision=6)
self.ui_FLTFLDGRP_zNeg = pm.floatFieldGrp(numberOfFields=1, label='-Z', precision=6)
pm.separator(style='none', height=5)
self.ui_BTN_create = pm.button(
label='Create',
height=MAIN_BUTTONS_HEIGHT,
command=self.ui_on_BTN_create_clicked
)
self.ui_BTN_close = pm.button(
label='Close',
height=MAIN_BUTTONS_HEIGHT,
command=self.uiClose
)
ui_LAY_mainForm.attachForm(ui_LAY_mainScroll, 'top', 2)
ui_LAY_mainForm.attachForm(ui_LAY_mainScroll, 'left', 2)
ui_LAY_mainForm.attachForm(ui_LAY_mainScroll, 'right', 2)
ui_LAY_mainForm.attachControl(ui_LAY_mainScroll, 'bottom', 2, self.ui_BTN_create)
ui_LAY_mainForm.attachNone(self.ui_BTN_create, 'top')
ui_LAY_mainForm.attachForm(self.ui_BTN_create, 'left', 2)
ui_LAY_mainForm.attachPosition(self.ui_BTN_create, 'right', 2, 50)
ui_LAY_mainForm.attachForm(self.ui_BTN_create, 'bottom', 2)
ui_LAY_mainForm.attachNone(self.ui_BTN_close, 'top')
ui_LAY_mainForm.attachPosition(self.ui_BTN_close, 'left', 2, 50)
ui_LAY_mainForm.attachForm(self.ui_BTN_close, 'right', 2)
ui_LAY_mainForm.attachForm(self.ui_BTN_close, 'bottom', 2)
self.setupInitialValues()
开发者ID:theetcher, 项目名称:mayaExtensionsOld, 代码行数:59, 代码来源:fx_createBBox.py
示例19: callback_timerangeSelect
def callback_timerangeSelect(*args):
#print args
opt = args[0]
pm.floatFieldGrp( 'timeRange_FFG', e=True, en=False )
if opt==1:
try:
camera = pm.textField( 'camera_TFG', q=True, text=True )
pm.floatFieldGrp( 'timeRange_FFG', e=True, value1=camera.startFrame.get(), value2=camera.endFrame.get() )
except:
pass
elif opt==2:
pm.floatFieldGrp( 'timeRange_FFG', e=True, value1=pm.playbackOptions( q=True, min=True ), value2=pm.playbackOptions( q=True, max=True ) )
elif opt==3:
pm.floatFieldGrp( 'timeRange_FFG', e=True, en=True )
开发者ID:kyuhoChoi, 项目名称:mayaTools, 代码行数:15, 代码来源:AlembicMasterExporter_old.py
示例20: LuxEnvironmentCreateTab
Python入门教程 Python 是一种解释型、面向对象、动态数据类型的高级程序设计语言。 P
阅读:13947| 2022-01-22
Python wikiutil.getFrontPage函数代码示例
阅读:10293| 2022-05-24
Python 简介 Python 是一个高层次的结合了解释性、编译性、互动性和面向对象的脚本
阅读:4180| 2022-01-22
Python tests.group函数代码示例
阅读:4065| 2022-05-27
Python util.check_if_user_has_permission函数代码示例
阅读:3891| 2022-05-27
Python 练习实例98 Python 100例题目:从键盘输入一个字符串,将小写字母全部转换成大
阅读:3540| 2022-01-22
Python 环境搭建 本章节我们将向大家介绍如何在本地搭建 Python 开发环境。 Py
阅读:3071| 2022-01-22
Python 基础语法 Python 语言与 Perl,C 和 Java 等语言有许多相似之处。但是,也
阅读:2733| 2022-01-22
Python output.darkgreen函数代码示例
阅读:2683| 2022-05-25
Python 中文编码前面章节中我们已经学会了如何用 Python 输出 Hello, World!,英文没
阅读:2350| 2022-01-22
请发表评论