本文整理汇总了Python中maya.cmds.window函数的典型用法代码示例。如果您正苦于以下问题:Python window函数的具体用法?Python window怎么用?Python window使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了window函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: smoothEdgeLineUI
def smoothEdgeLineUI():
"""
Smooth Edge Line UI
"""
# Window
window = 'smoothEdgesUI'
if cmds.window(window, q=True, ex=1): cmds.deleteUI(window)
window = cmds.window(window, t='Smooth Edge Line', s=True)
# Layout
CL = cmds.columnLayout()
# UI Elements
cmds.intSliderGrp('smoothEdges_smoothISG', label='Smooth', field=True, minValue=1, maxValue=20, fieldMinValue=1,
fieldMaxValue=100, value=4)
cmds.floatSliderGrp('smoothEdges_falloffFSG', label='Falloff Distance', field=True, precision=3, minValue=0.0,
maxValue=10.0, fieldMinValue=0.0, fieldMaxValue=100.0, value=0.01)
cmds.checkBoxGrp('smoothEdges_edgeSpacingCBG', label='Maintain Edge Spacing', numberOfCheckBoxes=1, v1=False)
cmds.checkBoxGrp('smoothEdges_snapToOrigCBG', label='Maintain Shape', numberOfCheckBoxes=1,
v1=False) # columnWidth2=[100,165]
cmds.checkBoxGrp('smoothEdges_deleteHistoryCBG', label='Delete History', numberOfCheckBoxes=1, v1=False)
cmds.button('smoothEdgesB', l='Smooth', w=390, c='glTools.model.straightenVerts.smoothEdgeLineFromUI()')
# Show Window
cmds.window(window, e=True, wh=[392, 115])
cmds.showWindow(window)
开发者ID:bennymuller,项目名称:glTools,代码行数:26,代码来源:straightenVerts.py
示例2: create
def create(self):
"""
Draw the window
"""
# delete the window if its handle exists
if cmds.window(self.window, exists=True):
# deletes window. 'window' flag makes sure that deleted object is a window
cmds.deleteUI(self.window, window=True)
# initialize the window
self.window = cmds.window(title=self.title, widthHeight=self.size, menuBar=True)
# main form for the window
self.mainForm = cmds.formLayout(numberOfDivisions=100)
# create common menu items items and buttons
self.commonMenu()
self.commonButtons()
# create a tabLayout
self.optionsBorder = cmds.tabLayout(scrollable=True, tabsVisible=False, height=1)
# Attach tabLayout to parent formLayout, and to control button
cmds.formLayout(self.mainForm, edit=True, attachForm=
([self.optionsBorder, 'top', 0],
[self.optionsBorder, 'left', 2],
[self.optionsBorder, 'right', 2]),
attachControl=
([self.optionsBorder, 'bottom', 5, self.applyBtn]))
# new form to attach controls in displayOptions()
self.optionForm = cmds.formLayout(numberOfDivisions=100)
self.displayOptions()
# Show the window
cmds.showWindow(self.window)
开发者ID:animformed,项目名称:maya-py-book-exercises,代码行数:29,代码来源:P_maya_c7_OptionWin.py
示例3: zbw_offsetAnim
def zbw_offsetAnim(*args):
"""creates offset from first obj sel to last based on the entered offset value"""
def zbw_runOffsetAnim(*args):
#get frame range!!!!!!
#get selection, check that they are tranforms
sel = cmds.ls(sl=True,type="transform")
selSize = int(len(sel))
#for each selection mult the index by the offset value
for i in range(0,selSize):
obj = sel[i]
offsetRaw = cmds.intFieldGrp('zbw_offsetValue', q=True, v=True)
offset = offsetRaw[0]
multFactor = i * offset
#shift the entire anim curve by the offset mult value
cmds.keyframe(obj, edit=True,relative=True,timeChange=multFactor,time=(1,24))
#create UI, get offset value, frame range or all anim
if (cmds.window('zbw_offsetAnimUI', exists=True)):
cmds.deleteUI('zbw_offsetAnimUI', window=True)
cmds.windowPref('zbw_offsetAnimUI', remove=True)
window=cmds.window('zbw_offsetAnimUI', widthHeight=(350,200), title='zbw_offsetAnim')
cmds.columnLayout(cal='center')
cmds.intFieldGrp('zbw_offsetValue', cal=(1,'left'), label='frequency(frames)', value1=5)
#CREATE FRAME RANGE AREA (WHICH FRAMES ARE WE DOING?)
#WHEN THAT HAPPENS, WHAT DO WE DO WITH THE FRAMES AFTER THAT? (PROBABLY NOTHING. . . LET USER WORRY ABOUT IT)
#checkbox for random freq (to give a random amount to offset each object)
#cmds.checkBoxGrp('zbw_animNoiseRandom', cal=(1,'left'), cw=(1, 175),label='random frequency on', value1=0, cc=zbw_animNoiseRandom)
cmds.button('zbw_offsetAnimGo', label='offset!', width=75, command=zbw_runOffsetAnim)
cmds.showWindow(window)
开发者ID:zethwillie,项目名称:zbw_python_tools,代码行数:30,代码来源:zbw_animTools.py
示例4: __init__
def __init__(s):
with report.Report():
tracker = JointTracker()
winName = "Orient_Joints"
if cmds.window(winName, ex=True):
cmds.deleteUI(winName)
s.win = cmds.window(rtf=True, w=300, t="Orient Joints")
cmds.columnLayout(adj=True)
cmds.button(
l="Attach Marker",
h=50,
c=Callback(tracker.addMarker),
ann="""
Attach a Marker to the selected Joint.
Rotate the marker into the desired joint rotation.
"""
)
cmds.button(
l="Update Joints",
h=50,
c=Callback(tracker.orientJoints),
ann="""
Rotate all joints that have markers to their respective rotations.
"""
)
cmds.showWindow(s.win)
cmds.scriptJob(uid=[s.win, tracker.removeMarkers])
开发者ID:internetimagery,项目名称:twinSkeleton,代码行数:27,代码来源:fixorient.py
示例5: particleLocatorsUI
def particleLocatorsUI():
"""
"""
# Get current frame range
start = cmds.playbackOptions(q=True, min=True)
end = cmds.playbackOptions(q=True, max=True)
# Define window
particleLocatorsUI = 'particleLocatorsWindow'
if cmds.window(particleLocatorsUI, q=True, ex=True): cmds.deleteUI(particleLocatorsUI)
particleLocatorsUI = cmds.window(particleLocatorsUI, t='Generate Locators')
# UI Layout
cmds.columnLayout(adj=False, cal='left')
partiTFG = cmds.textFieldGrp('partiLoc_particleTFG', label='Particle', text='', cw=[(1, 120)])
prefixTFG = cmds.textFieldGrp('partiLoc_prefixTFG', label='Prefix', text='', cw=[(1, 120)])
bakeAnicmdsBG = cmds.checkBoxGrp('partiLoc_bakeAnicmdsBG', label='Bake Animation', ncb=1, v1=0, cw=[(1, 120)])
startEndIFG = cmds.intFieldGrp('partiLoc_startEndISG', nf=2, label='Frame Range', v1=start, v2=end, cw=[(1, 120)])
rotateLocCBG = cmds.checkBoxGrp('partiLoc_rotateCBG', label='Rotate (rotatePP)', ncb=1, v1=0, cw=[(1, 120)])
scaleLocCBG = cmds.checkBoxGrp('partiLoc_scaleCBG', label='Scale (scalePP)', ncb=1, v1=0, cw=[(1, 120)])
cmds.button(l='Create Locators', c='glTools.tools.generateParticles.particleLocatorsFromUI()')
# Popup menu
cmds.popupMenu(parent=partiTFG)
for p in cmds.ls(type=['particle', 'nParticle']):
cmds.menuItem(p, c='cmds.textFieldGrp("' + partiTFG + '",e=True,text="' + p + '")')
# Show Window
cmds.showWindow(particleLocatorsUI)
开发者ID:bennymuller,项目名称:glTools,代码行数:31,代码来源:generateParticles.py
示例6: __enter__
def __enter__(self):
'''
Initialize the UI
'''
if mc.window(self.name, exists=True):
mc.deleteUI(self.name)
mc.window(self.name, title='ml :: '+self.title, iconName=self.title, width=self.width, height=self.height, menuBar=self.menu)
if self.menu:
self.createMenu()
self.form = mc.formLayout()
self.column = mc.columnLayout(adj=True)
mc.rowLayout( numberOfColumns=2, columnWidth2=(34, self.width-34), adjustableColumn=2,
columnAlign2=('right','left'),
columnAttach=[(1, 'both', 0), (2, 'both', 8)] )
#if we can find an icon, use that, otherwise do the text version
if self.icon:
mc.iconTextStaticLabel(style='iconOnly', image1=self.icon)
else:
mc.text(label=' _ _ |\n| | | |')
if not self.menu:
mc.popupMenu(button=1)
mc.menuItem(label='Help', command=(_showHelpCommand(wikiURL+'#'+self.name)))
mc.text(label=self.info)
mc.setParent('..')
mc.separator(height=8, style='single')
return self
开发者ID:Bumpybox,项目名称:Tapp,代码行数:35,代码来源:ml_utilities.py
示例7: __init__
def __init__(self):
winName = "Size set"
global typeMenu
winTitle = winName
if cmds.window(winName, exists=True):
cmds.deleteUI(winName)
# self.window = cmds.window(self.winName, title=self.winTitle, tbm=1, w=150, h=100 )
window = cmds.window(winName, title=winTitle, tbm=1, w=250, h=100 )
cmds.menuBarLayout(h=30)
cmds.rowColumnLayout (' selectArrayRow ', nr=1, w=250)
cmds.frameLayout('LrRow', label='', lv=0, nch=1, borderStyle='out', bv=1, p='selectArrayRow')
cmds.rowLayout (' rMainRow ', w=300, numberOfColumns=6, p='selectArrayRow')
cmds.columnLayout ('selectArrayColumn', parent = 'rMainRow')
cmds.setParent ('selectArrayColumn')
cmds.separator(h=10, p='selectArrayColumn')
cmds.gridLayout('listBuildButtonLayout', p='selectArrayColumn', numberOfColumns=2, cellWidthHeight=(100, 20))
typeMenu=cmds.optionMenu( label='ctrl size')
cmds.menuItem( label="Large" )
cmds.menuItem( label="Med" )
cmds.menuItem( label="Small" )
cmds.button (label='Change Selection', p='listBuildButtonLayout', command = lambda *args:self.controllerSize())
cmds.showWindow(window)
开发者ID:edeglau,项目名称:storage,代码行数:26,代码来源:HoofRig_Toe.py
示例8: build
def build(self):
if mc.windowPref(self.win, exists=1):
mc.windowPref(self.win, remove=1)
if mc.window(self.win,exists=1):
mc.deleteUI(self.win)
mc.window( self.win, title=self.title, widthHeight=(500, 210) )
cl1 = mc.columnLayout( columnAttach=('both', 2), rowSpacing=3, columnWidth=500, adjustableColumn = True)
mc.radioCollection()
self.mouth = mc.radioButton( l='user import', select=1, p=cl1 )
self.autoR = mc.radioButton( l='auto import', p=cl1 )
mc.separator()
mc.frameLayout('selected')
mc.rowLayout(numberOfColumns=3, columnWidth3=(80, 75, 150), adjustableColumn=2, columnAlign=(1, 'right'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)] )
mc.text(l='Mode')
mc.columnLayout()
mc.radioCollection()
self.prop = mc.radioButton( l='Prop', select=1 )
self.character = mc.radioButton( l='Character' )
mc.setParent( '..' )
mc.setParent( '..' )
self.numText = mc.floatFieldGrp( l='Num' )
self.txtProp = mc.textFieldButtonGrp( label='File Path', text='', buttonLabel='Browse', cw3 = (40,400,50), adjustableColumn3 = 2, cl3 = ('left', 'center', 'right'), bc = self.browse,cc=self.getPath )
#mc.separator()
#self.txtCharacter = mc.textFieldButtonGrp( label='Path', text='', buttonLabel='Browse', cw3 = (40,400,50), adjustableColumn3 = 2, cl3 = ('left', 'center', 'right'), bc = self.browse,cc=self.getPath )
#mc.separator()
mc.separator(p=cl1)
mc.button( 'importR', l='Import Reference File', p=cl1 )
mc.setParent( '..' )
开发者ID:chuckbruno,项目名称:Python_scripts,代码行数:28,代码来源:multiReference.py
示例9: windowSHM
def windowSHM(*args):
if cmds.window("shdrmnWin", exists = 1):
cmds.deleteUI("shdrmnWin")
win = cmds.window("shdrmnWin", title = "Shader manager", w = 500, sizeable = 0)
mainLayout = cmds.columnLayout (w = 500)
cmds.rowColumnLayout(w = 500, nc = 4, parent = mainLayout )
cmds.textFieldGrp( 'getAiAttrField', text = 'mColor')
cmds.button(label = "GET TX", w= 83, h = 50, c = getTextureFromShader )
cmds.button(label = "SHOW TX", w= 83, h = 50, c = assignPREVShader)
cmds.button(label = "TILE UV", w= 83, h = 50, c = setTileUV)
cmds.rowColumnLayout(w = 500, nc = 1, parent = mainLayout )
cmds.button(label = "DELETE PREVIEW", w= 500, h = 50, c = deleteShaders, parent = mainLayout )
cmds.separator(height=10, parent = mainLayout)
cmds.rowColumnLayout(w = 500, nc = 2, parent = mainLayout )
cmds.button(label = "GET MATERIALS", w= 250, h = 50, c = getMaterial )
cmds.button(label = "ASSIGN MATERIALS", w= 250, h = 50, c = asignMaterial )
cmds.showWindow(win)
开发者ID:Quazo,项目名称:breakingpoint,代码行数:25,代码来源:aiShaderManager.py
示例10: setupRLUI
def setupRLUI():
if cmds.window("RLWin", exists=True):
cmds.deleteUI("RLWin")
widgets["win"] = cmds.window("RLWin", t="zbw_setupRL", w=200, h=400)
widgets["mainCL"] = cmds.columnLayout(w=200)
widgets["mainFrame"] = cmds.frameLayout(l="Create Render Layers", w=200, cll=True, bgc=(.2,.2,.2))
widgets["CarKey"] = cmds.checkBox(l="Car_Env", v=True)
widgets["CarEnv"] = cmds.checkBox(l="Car_Key", v=True)
widgets["BGKey"] = cmds.checkBox(l="BG_Env", v=True)
widgets["BGEnv"] = cmds.checkBox(l="BG_Key", v=True)
widgets["AO"] = cmds.checkBox(l="All_AO", v=True)
widgets["MatteA"] = cmds.checkBox(l="All_MatteA", v=True)
widgets["MatteB"] = cmds.checkBox(l="All_MatteB", v=True)
widgets["MoVec"] = cmds.checkBox(l="All_MoVec", v=True)
widgets["Shadow"] = cmds.checkBox(l="All_Shadow", v=True)
widgets["createBut"] = cmds.button(l="Create Layers", w=200, h=40, bgc=(.6,.8,.6), c=createRL)
cmds.text("NOTE: this is setting the overrides for \nthe moVec layer RG's and materials \n(if you have them in scene\n for the AO and Movec layers but \n NO passes are set up")
cmds.separator(h=20, style = "double")
#widgets["copyBut"] = cmds.button(l="Copy Selected Layer", w=200, h=40, bgc=(.8,.8,.6), c=copyRL)
#cmds.separator(h=20, style = "double")
widgets["importBut"] = cmds.button(l="Import RL Shaders File", w=200, h=40, bgc=(.8,.6,.6), c=importRL)
cmds.showWindow(widgets["win"])
cmds.window(widgets["win"], e=True, w=200, h=400)
开发者ID:zethwillie,项目名称:zbw_python_tools,代码行数:27,代码来源:zbw_setupRL.py
示例11: create
def create( self, *args ):
if cmds.window( self.winName, ex=1 ):
cmds.deleteUI( self.winName, wnd=1 )
cmds.window( self.winName, title= self.title, titleBarMenu=0 )
cmds.columnLayout()
cmds.rowColumnLayout( nc=1, cw=[( 1,self.width-2)] )
cmds.text( l='Register ID', h=30 )
idField = cmds.textField( h=25 )
helpField = cmds.textField( en=0 )
cmds.setParent( '..' )
firstWidth = (self.width-2)*0.5
secondWidth = (self.width-2)-firstWidth
cmds.rowColumnLayout( nc=2, cw=[(1,firstWidth),(2,secondWidth)])
cmds.button( l='Create', h=25, c=self.cmdCreate )
cmds.button( l='Cancel', h=25, c=self.cmdCancel )
cmds.setParent( '..' )
cmds.window( self.winName, e=1,
width = self.width,
height = self.height )
cmds.showWindow( self.winName )
self.idField = idField
self.helpField = helpField
开发者ID:jonntd,项目名称:mayadev-1,代码行数:27,代码来源:view.py
示例12: SetTitle
def SetTitle(self,title):
""" Initialised the windows and define the windows titles
@type title: string
@param title: the window title
"""
self.title=title
self.winName= title.replace(" ","_").replace(".","_")+"_gui"
# print winName
# print cmds.window(winName, q=1, exists=1)
res = cmds.window(self.winName, q=1, exists=1)
# print res
if bool(res):
# print self.winName, " exist"
cmds.deleteUI(self.winName, window=True)
# print self.winName, " deleted"
#chec for the dock one
res = cmds.dockControl(self.winName, q=1, exists=1)
# print res
if bool(res):
# print self.winName+"dock", " exist"
cmds.deleteUI(self.winName, control=True)
# print self.winName, " deleted"
winName = cmds.window(self.winName, menuBar=True,title=title,
w=self.w*self.scale,h=self.h*self.scale)
print ("settitle ",winName, self.winName, winName==self.winName)
self.winName = winName
# cmds.window(self.winName,e=1,vis=True)
print self.winName, " created"
开发者ID:gj210,项目名称:upy,代码行数:29,代码来源:mayaUI.py
示例13: createWindow
def createWindow(self):
self.log.debug("creating window "+self.windowName)
if self.windowExists(self.windowName):
raise Exception("window %s already opened" % self.windowName)
if not self.useUserPrefSize:
try:
cmds.windowPref(self.windowName,remove=True)
cmds.windowPref(self.windowName,width=self.defaultWidth,height=self.defaultHeight)
except:
pass
cmds.window(self.windowName,
title=self.windowTitle,
maximizeButton=False,
minimizeButton=False,
width=self.defaultWidth,
height=self.defaultHeight,
sizeable=self.sizeable,
menuBar=self.menuBar)
cmds.scriptJob(uiDeleted=[self.windowName,self.onWindowDeleted])
HeadlessDataHost.HANDLE.addReference(self)
开发者ID:BigMacchia,项目名称:ngSkinTools,代码行数:25,代码来源:basetoolwindow.py
示例14: secondaryUI
def secondaryUI():
sec_UIname = 'secondary'
if cmds.window(sec_UIname,exists = True):
cmds.deleteUI(sec_UIname)
cmds.window(sec_UIname,title = 'rosa_secondary')
clmLot = cmds.columnLayout( adjustableColumn=True)
cmds.textField('ctrl_name',text = 'ctrl_name')
cmds.button('createctrl',label = 'create ctrl',h = 30,c = 'ctrl()')
cmds.button('load_model',label = 'load "org" model',c = 'load_org()')
cmds.textField('org_model',text = '"org" model')
cmds.button('load_property_obj',label = 'loading property add object',c = 'load_vis()')
cmds.textField('vis',text = 'Visibility')
#
flLot = cmds.flowLayout(columnSpacing = 6)
cmds.text(label = 'ctrl axial:')
cmds.radioCollection()
cmds.radioButton('follic',label = 'follic',select = 0)
cmds.radioButton('Custom',label = 'Custom',select = 1)
#
cmds.setParent( clmLot)
cmds.button(label = 'Generate',c = 'secondary_add()')
cmds.button('add_ctrl',label = 'add controller',c = 'add_controller()')
cmds.button('Add_modelSec',label = 'Add_modelSec',c = 'Add_modelSec()')
cmds.button(label = 'inverse_connect',c = 'inverse_connect01()')
#
cmds.frameLayout( label='modify ctrl:',borderStyle='etchedOut')
cmds.setParent( clmLot)
cmds.button(label = 'loding want to modify the controller',c = 'load_ctrl()')
cmds.textField('sec_ctrl',text = 'secondary_ctrl')
cmds.button(label = 'modify the controller position',c = 'ctrl_modify()')
cmds.button(label = 'complete controller modifies',c = 'modify_complete()')
cmds.showWindow()
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:32,代码来源:rosa_SecCtrl.py
示例15: create
def create(self):
if cmds.window( self.winName, ex=1 ):
cmds.deleteUI( self.winName, wnd=1 )
cmds.window( self.winName, title= self.title )
form = cmds.formLayout()
field_meshForm = self.field_mesh.create()
field_uvForm = self.field_uv.create()
checkForm = self.check.create()
buttons_form = self.buttons.create()
cmds.setParent( '..' )
cmds.formLayout( form, e=1,
af=[(field_meshForm, 'top', 0 ), ( field_meshForm, 'left', 0 ), ( field_meshForm, 'right', 0 ),
(field_uvForm, 'left', 0 ), ( field_uvForm, 'right', 0 ),
(checkForm, 'left', 0 ), (checkForm, 'right', 0 ),
(buttons_form, 'left', 0 ), ( buttons_form, 'right', 0 ) ],
ac=[(field_uvForm, 'top', 0, field_meshForm ),
(checkForm, 'top', 0, field_uvForm),
(buttons_form, 'top', 0, checkForm )])
cmds.window( self.winName, e=1, w=self.width, h=self.height )
cmds.showWindow( self.winName )
self.setTextInfomation()
self.popupSetting()
self.buttonCommandSetting()
开发者ID:jonntd,项目名称:mayadev-1,代码行数:28,代码来源:sgPWindow_data_mesh_import.py
示例16: create_comment
def create_comment(self, *args):
cmds.window('comment_win')
cmds.columnLayout()
cmds.text(l='Enter in new comment')
self.new_comment_field = cmds.scrollField()
add = cmds.button(l='Add', c=self.add_comment)
cmds.showWindow('comment_win')
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:7,代码来源:threeDF_rig_check_v011.py
示例17: create
def create(self):
if cmds.window('uvShellAlignWindow', exists = True):
cmds.deleteUI('uvShellAlignWindow')
self.window = cmds.window(self.window, title = self.title, widthHeight = self.size)
self.frameForm = cmds.frameLayout(label = " 1. 基準とする UVShell を選択して登録", bgc = (0.5, 0.3, 0.2), cll = False)
self.setUVSBtn1 = cmds.button(label = "基準 UVShell を登録" , command = self.registUVBndBox1, height = 30 )
cmds.rowLayout( numberOfColumns = 1, adj = True)
cmds.setParent("..")
self.frameForm = cmds.frameLayout(label = " 2. 位置を揃えたい UVShell を選択して実行", bgc = (0.2, 0.3, 0.5), cll = False)
self.distDcheckBox = cmds.radioButtonGrp('radioBtn', label = "", numberOfRadioButtons = 4 ,
sl = 1, cl4 = ['left','left','left','left'] , la4 = [ 'Left', 'Right', 'Bottom', 'Top'], adj = True)
self.backupPathText = cmds.text("※ 2016/1/5 現在、複数UVを選択した状態での位置揃えには対応していません", font = "smallBoldLabelFont", align = 'left');
self.setUVSBtn2 = cmds.button(label = "選択した UVShell を揃える" , command = self.registUVBndBox2, height = 30 )
cmds.setParent("..")
cmds.separator(width = self.width, style = 'in')
cmds.text("【問い合わせ先】 : TAセクション.村岡", bgc = (0.2, 0.2, 0.2), align = 'left', width = self.width);
cmds.setParent("..")
cmds.showWindow()
开发者ID:Polytrash,项目名称:Unity_script,代码行数:29,代码来源:UvShellAlignHelper.py
示例18: ruMainWindow
def ruMainWindow():
ruWin = "riggUtils"
if mc.window(ruWin,q=True,ex=True):
mc.deleteUI(ruWin)
mc.window(ruWin,title = "Rigging Utilities")
mc.scrollLayout(horizontalScrollBarThickness=16)
ruMainColumn = mc.columnLayout(columnAttach=("both",5),rowSpacing=10,columnWidth=320)
mc.frameLayout(label="General",bs="etchedOut",w=300,mw=5,cll=1)
mc.button(label='Show Axis',command='mc.toggle(state=True, localAxis=True)')
mc.button(label='Hide Axis',command='mc.toggle(state=False, localAxis=True)')
mc.frameLayout(label="Non T-Pose joint placer",bs="etchedOut",w=300,mw=5,cll=1,p=ruMainColumn)
mc.columnLayout(rs=5,adj=1)
mc.button(l="Create Helper Locator",c =ruCreateLocator)
mc.button(l="Create Joint on Helper Locator",c =ruCreateJointLocator)
mc.floatSliderGrp("ruJointRadius",en=1,label="Joint Radius",field=True,minValue=0,maxValue=5,fieldMinValue=0,fieldMaxValue=5,value=0.5,cw3=(70,30,10),dc=ruJointRadius)
mc.frameLayout(label="Fingers Utils",bs="etchedOut",w=300,mw=5,cll=1,p=ruMainColumn)
mc.columnLayout(rs=5,adj=1)
mc.floatSliderGrp("ruJointOrientation",en=1,label="Finger Orient",field=True,minValue=0,maxValue=5,fieldMinValue=0,fieldMaxValue=5,value=0.5,cw3=(70,30,10),dc=ruOrientJoint)
mc.frameLayout(label="Finger Renaming",bs="etchedOut",w=300,mw=5,cll=1)
mc.optionMenu('ruFinger',l='Choose finger')
mc.menuItem(l='Thumb')
mc.menuItem(l='Index')
mc.menuItem(l='Middle')
mc.menuItem(l='Ring')
mc.menuItem(l='Pinky')
mc.textFieldButtonGrp( label='Template string', text='', buttonLabel='Rename', bc=ruRenameFinger, cw3=[120,70,70],ct3=['left','left','left'],co3=[2,2,2] )
mc.showWindow(ruWin)
开发者ID:Mortaciunea,项目名称:bdScripts,代码行数:31,代码来源:riggUtils.py
示例19: addMultiAttr
def addMultiAttr():
#Create a variable for the window name
winName = 'blend'
winTitle = 'rh_addMultiAttr'
#Delete the window if it exists
if cmds.window(winName, exists=True):
cmds.deleteUI(winName, window=True)
#Build the main window
cmds.window(winName, title=winTitle, sizeable=True)
cmds.textFieldButtonGrp('Obj',label='Object :', text='', ed = False,buttonLabel='Load Sel',bc = 'sel()')
cmds.columnLayout(adjustableColumn=True)
cmds.textFieldGrp('Attr',l='Attribute:',text='')
cmds.columnLayout(adjustableColumn=True)
cmds.floatFieldGrp('minAttr', numberOfFields=1, label='Min Value', value1=0)
cmds.columnLayout(adjustableColumn=True)
cmds.floatFieldGrp('maxAttr', numberOfFields=1, label='Max Value', value1=0)
cmds.columnLayout(adjustableColumn=True)
cmds.button(label='Contact', command='Connect()')
cmds.columnLayout(adjustableColumn=True)
#Show the window
cmds.showWindow(winName)
cmds.window(winName, edit=True, width=300, height=120)
开发者ID:RyugasakiHu,项目名称:Maya-tools,代码行数:25,代码来源:rh_addMultiAttr.py
示例20: create
def create(self):
if cmds.window( Win_Global.winName, q=1, ex=1 ):
cmds.deleteUI( Win_Global.winName )
cmds.window( Win_Global.winName, title= Win_Global.title )
formOuter = cmds.formLayout()
stdForm = self.stdArea.create()
rigForm = self.rigArea.create()
followForm = self.followArea.create()
addRigForm = self.addRigArea.create()
cmds.setParent( '..' )
cmds.formLayout( formOuter, e=1,
af = [ (stdForm, 'left', 5), (stdForm, 'right', 5), (stdForm, 'top', 5),
(rigForm, 'left', 5), (rigForm, 'right', 5),
(followForm, 'left', 5), (followForm, 'right', 5),
(addRigForm, 'left', 5), (addRigForm, 'right', 5), (addRigForm, 'bottom', 5) ],
ac = [ (rigForm, 'top', 5, stdForm ),
(followForm, 'top', 5, rigForm ),
(addRigForm, 'top', 5, followForm )] )
cmds.window( Win_Global.winName, e=1, width = Win_Global.width, height= Win_Global.height )
cmds.showWindow( Win_Global.winName )
Win_Global.loadInfo()
开发者ID:jonntd,项目名称:mayadev-1,代码行数:27,代码来源:widget.py
注:本文中的maya.cmds.window函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论