本文整理汇总了Python中pymel.core.formLayout函数的典型用法代码示例。如果您正苦于以下问题:Python formLayout函数的具体用法?Python formLayout怎么用?Python formLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formLayout函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: 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
示例2: 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'] )
开发者ID:kzchen,项目名称:Maya_TD_tools,代码行数:26,代码来源:fixFaceAssignment_v05.py
示例3: __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)
],
)
开发者ID:kyuhoChoi,项目名称:mayaTools,代码行数:60,代码来源:ui_sample.py
示例4: show
def show(self):
self.window = pm.window(self.name, wh=(self.w, self.h), title=self.name)
self.fl = pm.formLayout(nd=100)
#create the main form layout of the window
self.frame_layout = pm.frameLayout(bgc=(.3,.1,.25), li=self.w/4, la='center', fn='boldLabelFont',
label='AW Binary Proxy Tools', borderStyle='in', mh=self.h/12,h=self.h-40)
self.cl = pm.columnLayout(adj=True, cal='left', cat=['both',0], rs=5)
pm.text(label='mip_renderProxy Creation', al='center')
pm.button (label='Create Render Proxies', bgc=(.4,.5,.2),
command= lambda *args: self._createRenderProxy( pm.ls(sl=True) ))
pm.separator(st='doubleDash', h=25)
pm.text(label='mip_renderProxy Assignment', al='center')
self.fileInput = TextFieldBrowserInput( width=300, name='Proxy Input', option_name='Proxy Browse Type', options=['from file', 'from folder'], button_name='Browse', parent=self.cl )
pm.button (label='Assign Render Proxies', bgc=(.4,.5,.2),
command= lambda *args: self._attachRenderProxy( pm.ls(sl=True) ))
pm.button (label='DELETE ALL BINARY PROXIES', bgc=(.4, .2, .2), command=self._removeAllBipx)
pm.setParent('..')
pm.setParent('..')
#add the close window button
self.close_btn = pm.button (w=self.bw, label='Close', bgc = (.4, .2, .2), command=self.close_UI)
#finalize form layout
pm.formLayout(self.fl, edit=True,
attachForm = [(self.frame_layout, 'top', 0),
(self.frame_layout, 'left', 0),
(self.frame_layout, 'right', 0),
(self.close_btn, 'bottom', 10),
(self.close_btn, 'right', 10)])
pm.showWindow(self.window)
开发者ID:creuter23,项目名称:tools,代码行数:29,代码来源:aw_binaryProxy.py
示例5: 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()
开发者ID:MassW,项目名称:OpenMaya,代码行数:60,代码来源:mtth_initialize.py
示例6: GUI
def GUI():
winName = 'squishy_ik_win'
if pmc.window(winName, exists=1):
pmc.deleteUI(winName)
win = pmc.window(winName, t='Squishy IK')
pmc.formLayout(numberOfDivisions=100)
pmc.rowColumnLayout(nc=2, rs=[15, 15], columnOffset=(1, 'both', 5))
pmc.text(l='1 - Create Placement Locators')
pmc.button(l='Make Locators', c=pmc.Callback(makeAutoRigLocators))
pmc.separator()
pmc.separator()
pmc.text(l='2 - Place locators where the spine begins and ends')
pmc.button(l='Select Locators', c=pmc.Callback(selectAutoRigLocators))
pmc.separator()
pmc.separator()
pmc.text(l='3 - With the locators place, go ahead and create the rig!')
pmc.button(l='Create Squishy Spine', c=pmc.Callback(squishySplineIkCallback))
pmc.separator()
pmc.separator()
pmc.text(l='4 - Select the joints to add to the skin cluster')
pmc.button(l='Select Bind Joints', c=pmc.Callback(selectSquishyJointsCallback))
win.show()
开发者ID:taozenforce,项目名称:cogswelladvancedrigging2014,代码行数:30,代码来源:primitives.py
示例7: displayOptions
def displayOptions( self ):
"""Build the interface"""
self.interface['TimeRange'] = cmds.radioButtonGrp( numberOfRadioButtons=2, label='Time Range', labelArray2=['Time Slider', 'Start/End'], onCommand=self.disableTimeRange )
self.interface['StartTime'] = cmds.intFieldGrp( label='Start Time' )
self.interface['EndTime'] = cmds.intFieldGrp( label='End Time' )
self.interface['Focals'] = cmds.textFieldGrp( label='Focals' )
self.interface['Cameras'] = cmds.textScrollList( allowMultiSelection=True, width=200, height=100 )
# self.interface['CamerasLabel'] = cmds.text( label='Cameras' )
self.formAttachPosition()
cmds.formLayout(
self.optionsForm, e=True,
attachForm=(
[ self.interface['TimeRange'], 'top', 10 ],
[ self.interface['Cameras'], 'bottom', 100 ],
[ self.interface['Cameras'], 'left', 150 ],
),
attachControl=(
[ self.interface['StartTime'], 'top', 0, self.interface['TimeRange'] ],
[ self.interface['EndTime'], 'top', 0, self.interface['StartTime'] ],
[ self.interface['Focals'], 'top', 0, self.interface['EndTime'] ],
[ self.interface['Cameras'], 'top', 10, self.interface['Focals'] ],
# [ self.interface['CamerasLabel'], 'top', 10, self.interface['Focals'] ],
# [ self.interface['CamerasLabel'], 'right', -90, self.interface['Cameras'] ],
),
attachNone=(
[ self.interface['Cameras'], 'left' ],
[ self.interface['Cameras'], 'right' ],
)
)
self.editMenuResetCmd() # Set the default values in the interface
开发者ID:Regnareb,项目名称:Maya,代码行数:32,代码来源:renderDifferentFocals.py
示例8: buildHeader
def buildHeader(self):
"""
Create buttons at the top of the view. These link to other views,
and display the current view by highlighting it in white.
If a custom header is desired, this method should be overridden.
"""
links = self.links()
if links != []:
with pm.frameLayout(lv=False, bs='out'):
with pm.formLayout('{0}LinkForm'.format(self.viewName), bgc=self._linkBgc) as form:
last = None
for viewName in links:
name = None
if self.gui.hasView(viewName):
name = self.gui.getViewClass(viewName).displayName
if name is None:
name = viewName
btn = pm.button(l=name, c=Callback(self.showView, viewName), h=18)
if viewName == self.viewName:
btn.setBackgroundColor([.86, .86, .86])
if last is None:
pm.formLayout(form, e=True, af=[(btn, 'left', 0)])
else:
pm.formLayout(form, e=True, ac=[(btn, 'left', 2, last)])
last = btn
self._headFrame.setManage(len(links) > 0)
开发者ID:bohdon,项目名称:viewGui,代码行数:27,代码来源:view.py
示例9: initUI
def initUI(self):
pm.setUITemplate("DefaultTemplate", pushTemplate=True)
form = pm.formLayout()
versionData = pm.mayatoCorona(version=True)
license = versionData[7].split("\r\n")
with pm.columnLayout('AboutLayout') as StandinLayout:
with pm.rowColumnLayout('AboutColumnLayout', nc=2, columnWidth=((1, 160), (2, 220)), co=(2, "left", 10)):
pm.text(label="mayaToCorona:", align="right")
pm.text(label=versionData[0], align="left")
pm.text(label="Corna version:", align="right")
pm.text(label=versionData[1], align="left")
pm.text(label="OIIO:", align="right")
pm.text(label=versionData[2], align="left")
pm.text(label="OSL:", align="right")
pm.text(label=versionData[3], align="left")
pm.text(label="BOOST:", align="right")
pm.text(label=versionData[4], align="left")
pm.text(label="OpenEXR:", align="right")
pm.text(label=versionData[5], align="left")
pm.text(label="License type:", align="right")
pm.text(label=license[0], align="left")
pm.text(label="Valid until:", align="right")
pm.text(label=license[1].replace("Activated until: ", ""), align="left")
pm.separator()
with pm.columnLayout():
pm.text(label="Corona Renderer\n(c) Render Legion s.r.o., 2014-2015", align="center")
#pm.textField(text="Corona Renderer (c) Render Legion s.r.o., 2014-2015")
pm.formLayout(form, edit=True, attachForm=[(StandinLayout, 'top', 5), (StandinLayout, 'bottom', 5), (StandinLayout, 'right', 5), (StandinLayout, 'left', 5)])
pm.setUITemplate("DefaultTemplate", popTemplate=True)
开发者ID:haggi,项目名称:OpenMaya,代码行数:29,代码来源:menu.py
示例10: createWindow
def createWindow():
""" try to get data from shotgun project fields
need to get context's project
context's shotgun instance
"""
app = self.parent
project = app.context.project
sg = app.context.tank.shotgun
# set filters and search fields for entity type "Project"
filters=[["id", "is", project['id']],]
fields=["sg_width", "sg_height"]
result=sg.find_one("Project", filters, fields)
# with result, set parameters accordingly or use default otherwise
if result:
videoWidth = result.get("sg_width", DEFAULT_WIDTH)
videoHeight = result.get("sg_height", DEFAULT_HEIGHT)
# Find first camera matching pattern and set as active camera
# if not use default current active camera
camera_name_pattern = app.get_setting( "camera_name_pattern", "persp" )
cameraList = [c.name() for c in pm.ls(type="camera", r=True) if re.search( camera_name_pattern, c.name() )]
if not "cam" in MODEL_EDITOR_PARAMS.keys() and cameraList:
MODEL_EDITOR_PARAMS["cam"] = cameraList[0]
# Give Viewport 2.0 renderer only for Maya 2015++
# mayaVersionString = cmds.about(version=True)
# mayaVersion = int(mayaVersionString[:4]) if len(mayaVersionString) >= 4 else 0
# if mayaVersion >= 2015:
# params[ "rendererName" ] = "vp2Renderer"
# Create window
if pm.windowPref( PLAYBLAST_WINDOW, exists=True ):
pm.windowPref( PLAYBLAST_WINDOW, remove=True )
window = pm.window( PLAYBLAST_WINDOW, titleBar=True, iconify=True,
leftEdge = 100, topEdge = 100,
width = videoWidth, height = videoHeight,
sizeable = False)
# Create editor area
layout = pm.formLayout()
editor = pm.modelEditor( **MODEL_EDITOR_PARAMS )
pm.setFocus( editor )
pm.formLayout( layout, edit=True,
attachForm = ( ( editor, "left", 0 ),
( editor, "top", 0 ),
( editor, "right", 0 ),
( editor, "bottom", 0 ) ) )
# Show window
pm.setFocus( editor )
pm.showWindow( window )
pm.refresh()
try:
yield True
except:
traceback.print_exc()
finally:
pm.deleteUI(window)
开发者ID:Eryckz,项目名称:tk-maya-playblast,代码行数:56,代码来源:setup_window.py
示例11: MakeFormLayout
def MakeFormLayout(title=None):
"""
Creates & returns a new PyMel form layout.
:param title: string, title of the layout, or None.
"""
if(title is not None):
return pm.formLayout(title)
else:
return pm.formLayout()
开发者ID:joemuers,项目名称:pyswarm,代码行数:10,代码来源:uiBuilder.py
示例12: FujiRendererCreateTab
def FujiRendererCreateTab(self):
log.debug("FujiRendererCreateTab()")
self.createGlobalsNode()
parentForm = pm.setParent(query = True)
pm.setUITemplate("attributeEditorTemplate", pushTemplate = True)
scLo = self.rendererName + "ScrollLayout"
if self.rendererTabUiDict.has_key('common'):
self.rendererTabUiDict.pop('common')
parentForm = pm.setParent(query = True)
uiDict = {}
self.rendererTabUiDict['common'] = uiDict
with pm.scrollLayout(scLo, horizontalScrollBarThickness = 0):
with pm.columnLayout(self.rendererName + "ColumnLayout", adjustableColumn = True, width = 400):
with pm.frameLayout(label="Sampling", collapsable = True, collapse=False):
self.addRenderGlobalsUIElement(attName = 'sampleJitter', uiType = 'float', displayName = 'SampleJitter', default='1.0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'sample_time_range_min', uiType = 'float', displayName = 'Sample Time Range Min', default='0.0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'sample_time_range_max', uiType = 'float', displayName = 'Sample Time Range Max', default='1.0', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'samplesX', uiType = 'int', displayName = 'Pixel Samples x', default=3, uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'samplesY', uiType = 'int', displayName = 'Pixel Samples y', default=3, uiDict=uiDict)
pm.separator()
self.addRenderGlobalsUIElement(attName = 'cast_shadow', uiType = 'bool', displayName = 'Cast Shadows', default='true', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'max_reflect_depth', uiType = 'int', displayName = 'Max Reflection Depth', default='3', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'max_refract_depth', uiType = 'int', displayName = 'Max Refraction Depth', default='3', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'raymarch_step', uiType = 'float', displayName = 'Raymarching Stepsize', default='0.05', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'raymarch_shadow_step', uiType = 'float', displayName = 'Raymarching Shadow Stepsize', default='0.1', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'raymarch_reflect_ste', uiType = 'float', displayName = 'Raymarching Reflection Stepsize', default='0.1', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'raymarch_refract_ste', uiType = 'float', displayName = 'Raymarching Refraction Stepsize', default='0.1', uiDict=uiDict)
pm.separator()
self.addRenderGlobalsUIElement(attName = 'doMotionBlur', uiType = 'bool', displayName = 'Motionblur:', default=False, uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'doDof', uiType = 'bool', displayName = 'Depth of Field:', default=False, uiDict=uiDict)
with pm.frameLayout(label="Output", collapsable = True, collapse=False):
attr = pm.Attribute(self.renderGlobalsNodeName + ".imageFormat")
ui = pm.attrEnumOptionMenuGrp(label = "Image Format", at=self.renderGlobalsNodeName + ".imageFormat", ei = self.getEnumList(attr))
with pm.frameLayout(label="Filtering", collapsable = True, collapse=False):
attr = pm.Attribute(self.renderGlobalsNodeName + ".filtertype")
ui = pm.attrEnumOptionMenuGrp(label = "Filter Type", at=self.renderGlobalsNodeName + ".filtertype", ei = self.getEnumList(attr))
ui = pm.intFieldGrp(label="Filter Size:", numberOfFields = 1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".filtersize", index = 2 )
with pm.frameLayout(label="Renderer", collapsable = True, collapse=False):
self.addRenderGlobalsUIElement(attName = 'use_max_thread', uiType = 'bool', displayName = 'Use Max Threads', default='true', uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'threads', uiType = 'int', displayName = 'Threads', default=8, uiDict=uiDict)
self.addRenderGlobalsUIElement(attName = 'tilesize', uiType = 'int', displayName = 'Tile Size', default=64, uiDict=uiDict)
ui = pm.intFieldGrp(label="Verbosity:", numberOfFields = 1)
pm.connectControl(ui, self.renderGlobalsNodeName + ".rendererVerbosity", 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) ])
self.FujiRendererUpdateTab()
开发者ID:MassW,项目名称:OpenMaya,代码行数:55,代码来源:mtfu_initialize.py
示例13: 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
示例14: 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
示例15: MantraTranslatorCreateTab
def MantraTranslatorCreateTab(self):
log.debug("MantraTranslatorCreateTab()")
self.createGlobalsNode()
parentForm = pm.setParent(query=True)
pm.setUITemplate("attributeEditorTemplate", pushTemplate=True)
scLo = self.rendererName + "TrScrollLayout"
with pm.scrollLayout(scLo, horizontalScrollBarThickness=0):
with pm.columnLayout(self.rendererName + "TrColumnLayout", adjustableColumn=True):
mantraAttributes.mantraTranslatorATList.createUi(self.renderGlobalsNodeName)
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,代码行数:12,代码来源:mtm_initialize.py
示例16: 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:"
|
请发表评论