本文整理汇总了Python中maya.cmds.radioButton函数的典型用法代码示例。如果您正苦于以下问题:Python radioButton函数的具体用法?Python radioButton怎么用?Python radioButton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了radioButton函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: core
def core(self):
addSpaceWidth = 20
editWidt = self._width-addSpaceWidth
halfWidth = editWidt/2
lastWidth = editWidt - halfWidth
cmds.rowColumnLayout( nc=4, cw=[(1,addSpaceWidth+self._sideWidth),
(2,halfWidth),
(3,lastWidth),
(4,self._sideWidth)] )
self._nameCollection = cmds.radioCollection()
mainInfo.setSpace()
cmds.radioButton( l='Prefix', sl=1 )
cmds.radioButton( l='Namespace' )
mainInfo.setSpace()
cmds.setParent( '..' )
mainInfo.setSpaceH( 5 )
buttonWidth = self._width/2
lastWidth = self._width - buttonWidth
cmds.rowColumnLayout( nc=4, cw=[(1,self._sideWidth),
(2,buttonWidth),
(3,lastWidth),
(4,self._sideWidth)] )
mainInfo.setSpace()
self._frontNameOptionMenu = cmds.optionMenu( )
cmds.menuItem( l='the file name' )
cmds.menuItem( l='this string')
self._thisStringField = cmds.textField( en=0 )
mainInfo.setSpace()
cmds.setParent( '..' )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:33,代码来源:addNamespace.py
示例2: create
def create(self):
if cmds.window(self.window, exists=True):
cmds.deleteUI(self.window);
self.window = cmds.loadUI(uiFile=self.uiFile, verbose=False)
cmds.showWindow(self.window);
try:
initPos = cmds.windowPref( self.window, query=True, topLeftCorner=True )
if initPos[0] < 0:
initPos[0] = 0
if initPos[1] < 0:
initPos[1] = 0
cmds.windowPref( self.window, edit=True, topLeftCorner=initPos )
except :
pass
ctrlPath = '|'.join([self.window, 'radioButton']);
cmds.radioButton(ctrlPath, edit=True, select=True);
ctrlPath = '|'.join([self.window, 'groupBox_4']);
cmds.control(ctrlPath, edit=True, enable=False);
ctrlPath = '|'.join([self.window, 'groupBox_2', 'pushButton_7']);
cmds.button(ctrlPath, edit=True, enable=False);
ctrlPath = '|'.join([self.window, 'groupBox_2', 'lineEdit']);
cmds.textField(ctrlPath, edit=True, text="-u --oiio");
开发者ID:Quazo,项目名称:breakingpoint,代码行数:27,代码来源:txManager.py
示例3: create
def create(self):
form = cmds.formLayout()
text = cmds.text( l= self.label, w=self.width1, h=self.height, al= self.aline )
radio = cmds.radioCollection()
rb1 = cmds.radioButton( l=self.rbLabel1, w=self.width2, sl=1 )
rb2 = cmds.radioButton( l=self.rbLabel2, w=self.width3 )
rb3 = cmds.radioButton( l=self.rbLabel3, w=self.width4 )
check = cmds.checkBox( l=self.rbLabel4 )
txf = cmds.textField( en=0 )
cmds.setParent( '..' )
cmds.formLayout( form, e=1,
af = [( text, 'top', 0 ),( text, 'left', 0 ),
( rb1, 'top', 0 ), ( rb2, 'top', 0 ), ( rb3, 'top', 0 )],
ac = [( rb1, 'left', 0, text ), ( rb2, 'left', 0, rb1 ), ( rb3, 'left', 0, rb2 ),
( check, 'top', 0, text ), ( check, 'left', 0, text ),
( txf, 'top', 0, text ), ( txf, 'left', 0, check )] )
WinA_Global.searchForType_radio = radio
WinA_Global.searchForType_check = check
WinA_Global.searchForType_txf = txf
WinA_Global.searchForType_form = form
return form
开发者ID:jonntd,项目名称:mayadev-1,代码行数:25,代码来源:sgPWindow_data_mesh_exportGroup.py
示例4: create
def create(self):
if mc.window(self.window,exists=True):
mc.deleteUI(self.window,window=True)
self.window = mc.window(self.window, title=self.title,widthHeight=self.size,menuBar=True)
self.mainForm = mc.formLayout(nd=100)
self.commandMenu()
self.commonButtons()
self.secondForm = mc.formLayout(nd=100)
self.lightRigTypeText = mc.text( label = "Rig Type:", height = 15)
radBtnCollection1 = mc.radioCollection()
self.indoorRadBtn = mc.radioButton( "indoorRadBtn", label = "Indoor", onCommand = partial(self.rigBtnToggle,1) )
self.outdoorRadBtn = mc.radioButton( "outdoorRadBtn",label = "Outdoor", onCommand = partial(self.rigBtnToggle,2) )
self.timeOfDayText = mc.text( label = "Time of Day:", height = 15)
radBtnCollection2 = mc.radioCollection()
self.morningRadBtn = mc.radioButton( "morningRadBtn", label = "Morning", enable = True, onCommand = partial(self.dayBtnToggle,1) )
self.noonRadBtn = mc.radioButton( "noonRadBtn", label = "Noon", enable = True, onCommand = partial(self.dayBtnToggle,2) )
self.nightRadBtn = mc.radioButton( "nightRadBtn", label = "Night", enable = True, onCommand = partial(self.dayBtnToggle,3) )
mc.formLayout( self.secondForm, e = True, attachForm = ( [self.lightRigTypeText,"left", 135],[self.lightRigTypeText, "bottom", 500],
[self.indoorRadBtn, "left", 185],[self.indoorRadBtn, "bottom", 497],
[self.outdoorRadBtn, "left", 185],[self.outdoorRadBtn, "bottom", 477],
[self.timeOfDayText,"left", 120], [self.timeOfDayText, "bottom", 452],
[self.morningRadBtn, "left", 185],[self.morningRadBtn, "bottom", 449],
[self.noonRadBtn, "left", 185],[self.noonRadBtn, "bottom", 429],
[self.nightRadBtn, "left", 185],[self.nightRadBtn, "bottom", 409]))
mc.radioCollection( radBtnCollection1, edit=True, select = self.indoorRadBtn )
self.displayOptions()
mc.showWindow()
开发者ID:JimmyFrando,项目名称:Scripts,代码行数:34,代码来源:lightRig.py
示例5: exportAssets_UI
def exportAssets_UI(self, *args):
self.UIElements = {}
# If the window exists, delete it.
if cmds.window("ExportAssets", exists=True):
cmds.deleteUI("ExportAssets")
# Create the main window
self.UIElements["window"] = cmds.window("ExportAssets", widthHeight=(240, 200), s=True )
# Create a flow layout to hold the UI Elements
self.UIElements["radioFlowLayout"] = cmds.flowLayout(v=True, w=220)
cmds.setParent( '..' )
cmds.setParent(self.UIElements["radioFlowLayout"])
cmds.radioCollection()
self.UIElements['rigRadioButton'] = cmds.radioButton(l='Export Rig?')
cmds.radioCollection()
self.UIElements['setupRadioButton'] = cmds.radioButton(l='Export Setup?')
cmds.separator( height=7, style='in' )
cmds.text(l=' Rename the Setup?')
self.UIElements['nameTxt'] = cmds.textField(w=220, tx=self.characterName)
self.UIElements['exportButton'] = cmds.button(label='Export Game Assets', width=220, c=self.exportGameAssets)
cmds.showWindow(self.UIElements["window"])
开发者ID:griffinanimator,项目名称:MPR,代码行数:30,代码来源:altSetupTools.py
示例6: 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
示例7: read_windowInfo
def read_windowInfo():
import cPickle
import sgBFunction_fileAndPath
if not os.path.exists( WinA_Global.infoPath ):
sgBFunction_fileAndPath.makeFile( WinA_Global.infoPath )
sgBFunction_fileAndPath.makeFile( WinA_Global.infoPathPath )
try:
f = open( WinA_Global.infoPath, 'r' )
data = cPickle.load( f )
f.close()
except: return None
if not data: return None
try:exportPath, exportType, searchFor, searchForType, splitStringAndSerchCheck, splitStringAndSearchString = data
except: return None
cmds.textField( WinA_Global.exportPath_txf, e=1, tx= exportPath )
items = cmds.radioCollection( WinA_Global.exportType_radio, q=1, cia=1 )
cmds.radioButton( items[ exportType ], e=1, sl=1 )
cmds.textField( WinA_Global.searchFor_txf, e=1, tx=searchFor )
items = cmds.radioCollection( WinA_Global.searchForType_radio, q=1, cia=1 )
cmds.radioButton( items[ searchForType ], e=1, sl=1 )
cmds.checkBox( WinA_Global.searchForType_check, e=1, v=splitStringAndSerchCheck )
cmds.textField( WinA_Global.searchForType_txf, e=1, tx=splitStringAndSearchString )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:27,代码来源:sgPWindow_data_mesh_exportGroup.py
示例8: doIt
def doIt( self, arglist ):
wnd = cmds.window( "kgmEngineWindow_" + str(time.time()), widthHeight = ( 200, 200 ) )
#cmds.columnLayout( adjustableColumn = True )
#cmds.button( label = 'Export Map', command = kgmEngine.exportMap )
#cmds.button( label = 'Export Mesh', command = kgmEngine.exportMesh )
#cmds.button( label = 'Export Skeleton', command = kgmEngine.exportSkeleton )
#cmds.button( label = 'Export Animation', command = kgmEngine.exportAnimation )
#cmds.button( label = 'Insert Node', command = kgmEngine.insertNode )
cmds.columnLayout()
cmds.rowColumnLayout( numberOfColumns = 2 )
cmds.checkBox( "Mesh", label="Mesh", value=False, onCommand=kgmEngine.enableMesh, offCommand=kgmEngine.enableMesh )
cmds.checkBox( "Material", label="Material", value=False, onCommand=kgmEngine.enableMaterial, offCommand=kgmEngine.enableMaterial )
cmds.checkBox( "Skeleton", label="Skeleton", value=False, onCommand=kgmEngine.enableSkeleton, offCommand=kgmEngine.enableSkeleton )
cmds.checkBox( "Animation", label="Animation", value=False, onCommand=kgmEngine.enableAnimation, offCommand=kgmEngine.enableAnimation )
cmds.columnLayout()
cmds.rowColumnLayout( numberOfColumns = 2 )
cmds.columnLayout( adjustableColumn=True )
cmds.button( label = 'Export', command = kgmEngine.export )
cmds.button( label = 'Insert Node', command = kgmEngine.insertNode )
cmds.columnLayout()
cmds.rowColumnLayout( numberOfColumns = 3 )
cmds.columnLayout( adjustableColumn=True )
cmds.radioCollection()
cmds.radioButton( label='Bin', align='left', select=False )
cmds.radioButton( label='Xml', align='left', select=True )
#cmds.radioButtonGrp( label='Format', labelArray3=['Bin', 'Txt', 'Xml'], numberOfRadioButtons=3 )
#cmds.radioButton( 'Format', label='Bin', )
cmds.showWindow( wnd )
开发者ID:nocs13,项目名称:kgmEngine,代码行数:31,代码来源:kgmExport.py
示例9: 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
示例10: rsLaunchObInPa
def rsLaunchObInPa(self, *args):
d_type = {' Empty Group': 0, ' Locator': 1, ' Joint': 2, ' Scene Object ': 3}
l_curves = cmds.ls(selection=True)
i_number = cmds.intSliderGrp(self.intSliderObInPa, q=True, v=True)
s_type = cmds.text(self.rsTextObInPa, q=True, l=True)
i_type = d_type[s_type]
b_consPos = cmds.checkBox(self.mainPosObInPa, q=True, v=True)
b_consOri = cmds.checkBox(self.mainTangObInPa, q=True, v=True)
b_orientWorld = cmds.checkBox(self.globalOriObInPaObInPa, q=True, v=True)
b_parentHierarchy = cmds.checkBox(self.parentHierarObInPa, q=True, v=True)
b_selectNewObjs = cmds.checkBox(self.selectNewObjsObInPa, q=True, v=True)
o_toCurve = cmds.textField(self.fieldObInPa, q=True, text=True)
if o_toCurve == "":
o_toCurve = None
try:
if cmds.objExists(o_toCurve):
pass
except:
o_toCurve = None
i_instance = cmds.radioButton(self.instanceObInPa, q=True, select=True)
i_loft = 0
if cmds.radioButton(self.opPolyObInPa, q=True, select=True):
i_loft = 1
if cmds.radioButton(self.opNurbsObInPa, q=True, select=True):
i_loft = 2
rsObjectsInPath(l_curves, i_number, i_type, b_consPos, b_consOri, b_orientWorld, b_parentHierarchy, b_selectNewObjs, o_toCurve, i_instance, i_loft)
开发者ID:RigStudio,项目名称:rsObjectsInPath,代码行数:26,代码来源:rsObjectsInPath.py
示例11: apply_file
def apply_file(input):
filepath = cmds.textField('animlib_filepath', query=True, text=True)
data = animlib.file.read(filepath)
(info_data,
dependency_data,
reference_data,
anim_curve_data,
constraint_data,
pairblend_data,
channel_data,) = data
if 'references' in info_data.keys():
reference_remap = read_ref_map(info_data['references'].keys())
else:
reference_remap = None
print '!!!!!'+str(reference_remap)
force_build_state = cmds.radioButton('animlib_force_build',
query=True,
select=True)
build_unfound = cmds.radioButton('animlib_build_unfound',
query=True,
select=True)
result = animlib.apply.build(data,
force_build=force_build_state,
reference_filter=reference_remap,
reference_unfound=build_unfound)
ref_update(None)
开发者ID:timmygaul,项目名称:animlib,代码行数:26,代码来源:ui.py
示例12: SundayAssetExportOptionsUI
def SundayAssetExportOptionsUI():
global assetExportDialog
SundayMayaGuiPath = mel.eval('getenv SundayGui;')
assetExportDialog = cmds.loadUI(uiFile = SundayMayaGuiPath + 'SundayAssetExportOption.ui')
sceneName = cmds.file(query = True, shn = True, sn = True)
assetName = sceneName.split('_')
cmds.textField('assetExportNameLineEdit', edit = True, text = assetName[0])
cmds.radioButton('assetExportSelectedRadioButton', edit = True, changeCommand = 'SundayAssetExportPy.SundayAssetExportOptionsRigAndGeoCheckBoxToggle()')
cmds.showWindow(assetExportDialog)
开发者ID:elliottjames,项目名称:jeeves,代码行数:9,代码来源:SundayAssetExportPy.py
示例13: ui
def ui(self):
if mc.window(self.winName,ex=True):
mc.deleteUI(self.winName,window=True)
else:
pass
#----- window -----#
mc.window(self.winName , t = 'Edit Crv v1.0',w = 235,h = 160 , sizeable=False)
# main
self.form = mc.formLayout()
#1 rowColumnLayout
row = mc.rowColumnLayout(nc = 2,cat = [1,'right',5],ro = [(1,'both',2),(2,'both',2),(3,'both',2),(4,'both',2)])
self.rotateBN = mc.iconTextButton( style='textOnly' , w=150 , bgc=[0.5, 0.4, 0.33] , label='r o t a t e - c r v' , c=lambda *args:self.uiRunCmd('rotate') )
self.rotateFLE = mc.textField( 'rotateText' , w=70 , ed=True , text='45' )
self.scaleBN = mc.iconTextButton( style='textOnly' , w=150 , bgc=[0.5, 0.4, 0.33] , label='s c a l e - c r v' , c=lambda *args:self.uiRunCmd('scale') )
self.scaleFLE = mc.textField( 'scaleText' , w=70 , ed=True ,text='0.5' )
mc.setParent('..')
#2 columnLayout
column = mc.columnLayout(adj = True)
mc.separator( style="in" , h=10 )
#2.1 rowLayout
self.RIDRow = mc.rowLayout(nc = 3,cat = [1,'left',30])
self.AxisRID = mc.radioCollection()
self.xAxisTypeRID = mc.radioButton('x' , l='X', w=60)
self.yAxisTypeRID = mc.radioButton('y' , l='Y', w=60)
self.zAxisTypeRID = mc.radioButton('z' , l='Z', w=60)
mc.radioCollection( self.AxisRID, edit=True, select=self.xAxisTypeRID )
mc.setParent('..')
self.runBN = mc.iconTextButton( style='textOnly' , h=30 , bgc=[0.23,0.33,0.39] , label='m i r r o r' , c=lambda *args:self.uiRunCmd('mirror'))
mc.separator( style="in" , h=10 )
#2.2 rowLayout
self.eximRow = mc.rowLayout(nc = 2)
self.exportBN = mc.iconTextButton( style='textOnly' , w=110 , bgc=[0.5, 0.4, 0.33] , label='e x p o r t - s h a p e' , c=lambda *args:self.exportCurveShape() )
self.importBN = mc.iconTextButton( style='textOnly' , w=110 , bgc=[0.5, 0.4, 0.33] , label='i m p o r t - s h a p e' , c=lambda *args:self.importCurveShape() )
mc.setParent('..')
mc.formLayout(self.form, edit=True,
attachForm=[(row, 'top', 5), (row, 'left', 5), (row, 'right', 5), (column, 'bottom', 5), (column, 'right', 5), (column, 'left', 5) ],
attachControl=[(row, 'bottom', 5, column)])
mc.showWindow(self.winName)
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:57,代码来源:rosa_EditCrvTool.py
示例14: ref_update
def ref_update(value):
build_colour = [0.4,0.8,0.4]
apply_colour = [0.3,0.55,1]
skip_colour = [0.8,0.4,0.4]
force_build_state = cmds.radioButton('animlib_force_build',
query=True,
select=True)
build_unfound_state = cmds.radioButton('animlib_build_unfound',
query=True,
select=True)
namespaces = cmds.text('animlib_ref_nsp_list', query=True,
label=True).split('#')
for namespace in namespaces:
if namespace:
field = 'animlib_ref_'+namespace+'_txt'
new_nsp = cmds.textField(field,
query=True,
text=True)
if not new_nsp.startswith(':'):
new_nsp = ':' + new_nsp
cmds.textField(field,
edit=True,
text = new_nsp)
if new_nsp==':':
cmds.textField(field,
edit=True,
text = '',
backgroundColor = skip_colour)
continue
if force_build_state:
cmds.textField(field,
edit=True,
backgroundColor = build_colour)
continue
if cmds.namespace(exists=new_nsp):
cmds.textField(field,
edit=True,
backgroundColor = apply_colour)
continue
if build_unfound_state:
cmds.textField(field,
edit=True,
backgroundColor = build_colour)
continue
cmds.textField(field,
edit=True,
backgroundColor = skip_colour)
开发者ID:timmygaul,项目名称:animlib,代码行数:57,代码来源:ui.py
示例15: __init__
def __init__(self):
#liste des attributs
self.listNamespace = []
self.listEmptyNamespace = []
self.listSelectedNamespace = []
#If the window already exists, erase it
if cmds.window('InE_NSMWin', exists=True):
cmds.deleteUI('InE_NSMWin')
#Create the window
#s : Can window be resized?
#rtf : Resize to fit childrens?
self.window = cmds.window('InE_NSMWin', title = "Namespace Manager", widthHeight=(520, 435), s = False, rtf=True)
#Main layout
cmds.formLayout("InE_NSMFlowLayout", p = 'InE_NSMWin', w = 50, h = 50)
cmds.image(image="R:\Benoit\Scripts\maya\icons\NSMBackground.png")
#Layout that draws an empty space at the top to see the beautyful flowers
cmds.columnLayout('InE_NSMEmptyLayout', p = "InE_NSMFlowLayout", columnAttach=('both', 14), rowSpacing=5, columnWidth=520, cal="left" )
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
cmds.text(label = "", p = 'InE_NSMEmptyLayout')
#Real main layout containing all the UI
cmds.rowColumnLayout( 'InE_NSMMainLayout', p = "InE_NSMEmptyLayout", numberOfColumns=2, columnWidth=[(1, 300), (2, 190)], h = 330, ro = [[1, "both", 20], [2, "both", 10]], co = [[1, "both", 10], [2, "both", 0]])
cmds.treeView('InE_NSMTextScrollList', parent = "InE_NSMMainLayout", numberOfButtons = 0, h= 150, abr = False, ams = True, adr = True, arp = True, idc = self.emptyMethod, sc = self.selectNamespace )
cmds.treeView('InE_NSMTextScrollList', edit = True, enk = True)
cmds.columnLayout('InE_NSMInformations', p = "InE_NSMMainLayout", columnAttach=('both', 0), cw = 250, rowSpacing=5, cal="left" , ebg = True)
cmds.text(p = 'InE_NSMInformations', label = "Informations")
cmds.text('InE_NSMNameInformations', p = 'InE_NSMInformations', label = "")
cmds.text('InE_NSMEmptyInformations', p = 'InE_NSMInformations', label = "")
cmds.columnLayout('InE_NSMModifications', p = "InE_NSMMainLayout", columnAttach=('both', 20), co = ("both", 10), cw = 250, rowSpacing=6, cal="left" , ebg = True)
cmds.text(p = 'InE_NSMModifications', label = "Rename selected to: ")
cmds.textField('InE_NSMNameInput', p = 'InE_NSMModifications')
cmds.radioCollection('InE_NSMRadioCollection', p = 'InE_NSMModifications')
cmds.radioButton('InE_NSMRadioButton1', label='and keep namespace hierarchy', select=True )
cmds.radioButton('InE_NSMRadioButton2', label='and move namespace to root' )
cmds.button('InE_NSMRenameSelected', p = 'InE_NSMModifications', label = "Rename selected", en = True, command = self.renameSelected)
cmds.columnLayout('InE_NSMButtons', p = "InE_NSMMainLayout", columnAttach=('both', 20), co = ("both", 10), rowSpacing=23, cal="left" , ebg = True)
cmds.button('InE_NSMRemoveSelected', p = 'InE_NSMButtons', label = "Remove selected", w = 128, en = True, command = self.removeSelected)
cmds.button('InE_NSMRemoveEmpty', p = 'InE_NSMButtons', label = "Remove empty", w = 128, en = True, command = self.removeEmpty)
cmds.button('InE_NSMRemoveAll', p = 'InE_NSMButtons', label = "Remove all", w = 128, en = True, command = self.removeAll)
cmds.showWindow()
self.updateTreeView()
print self.listNamespace
开发者ID:BenoitValdes,项目名称:PipelineTools_Maya,代码行数:56,代码来源:NamespaceManager.py
示例16: addShaderInWindow
def addShaderInWindow():
'''This function does:
- create radioButton for shader;
- extract object type;'''
# mc.checkBox(label=shader)
radioCollection1 = mc.radioCollection()
for material in listMaterials:
OnCommandValue = 'checkSelected( "' + material + '")'
mc.radioButton( material, label=material, select=True, onCommand=OnCommandValue )
TypeShader = mc.nodeType( material )
mc.text( label=TypeShader )
开发者ID:remusvrm,项目名称:scripts,代码行数:11,代码来源:hypershade.py
示例17: SundayLocatorToolCreate
def SundayLocatorToolCreate(locatorType):
objects = cmds.ls(selection = True)
locators = []
locatorUp = '0 0 0'
if cmds.radioButton('LocatorDirectionXUpRadioButton', query = True, select = True):
locatorUp = '0 0 90'
if cmds.radioButton('LocatorDirectionYUpRadioButton', query = True, select = True):
locatorUp = '0 90 0'
if cmds.radioButton('LocatorDirectionZUpRadioButton', query = True, select = True):
locatorUp = '90 0 0'
if cmds.checkBox('SundayLocatorToolMakeControllerForSelectedCheckBox', query = True, value = True):
if len(objects) != 0:
for curObj in objects:
mel.eval(SundayLocatorToolPy.SundayLocatorToolGetLocator(curObj + '_CTRL', locatorType, locatorUp))
curLocator = cmds.ls(selection = True)[0]
locators.append(curLocator)
cmds.setAttr(curLocator + '.overrideEnabled', 1)
cmds.setAttr(curLocator + '.overrideColor', int(cmds.iconTextRadioCollection('SundayLocatorToolColorCollection', query = True, select = True).split('_')[1]))
cmds.select(curObj, curLocator)
cmds.pointConstraint(name = curLocator + '_tempJOINTPointConstraint')
cmds.orientConstraint(name = curLocator + '_tempJOINTOrientConstraint')
cmds.delete(curLocator + '_tempJOINTPointConstraint*')
cmds.delete(curLocator + '_tempJOINTOrientConstraint*')
else:
SundayDialogPy.SundayDialogConfirm('Error ', 'No objects selected', 'OK')
return None
(len(objects) != 0).select(locators)
cmds.headsUpMessage('Transform the locator(s) as you like and deselect to make it an controller')
cmds.scriptJob(event = [
'SelectionChanged',
'SundayLocatorToolPy\nreload(SundayLocatorToolPy)\nSundayLocatorToolPy.SundayLocatorToolMoveSelectedToLocator(' + str(locators) + ', ' + str(objects) + ')'], runOnce = True)
elif len(objects) != 0:
for curObj in objects:
mel.eval(SundayLocatorToolPy.SundayLocatorToolGetLocator(curObj + '_CTRL', locatorType, locatorUp))
curLocator = cmds.ls(selection = True)[0]
cmds.setAttr(curLocator + '.overrideEnabled', 1)
cmds.setAttr(curLocator + '.overrideColor', int(cmds.iconTextRadioCollection('SundayLocatorToolColorCollection', query = True, select = True).split('_')[1]))
locators.append(curLocator)
cmds.select(curObj, curLocator)
cmds.pointConstraint(name = curLocator + '_tempJOINTPointConstraint')
cmds.orientConstraint(name = curLocator + '_tempJOINTOrientConstraint')
cmds.delete(curLocator + '_tempJOINTPointConstraint*')
cmds.delete(curLocator + '_tempJOINTOrientConstraint*')
cmds.select(locators)
else:
mel.eval(SundayLocatorToolPy.SundayLocatorToolGetLocator('SundayLocator', locatorType, locatorUp))
curLocator = cmds.ls(selection = True)[0]
cmds.setAttr(curLocator + '.overrideEnabled', 1)
cmds.setAttr(curLocator + '.overrideColor', int(cmds.iconTextRadioCollection('SundayLocatorToolColorCollection', query = True, select = True).split('_')[1]))
开发者ID:elliottjames,项目名称:jeeves,代码行数:54,代码来源:SundayLocatorToolPy.py
示例18: buildUi
def buildUi(self):
self.wind = cmds.window(self.winName,
title='Matrix collision setup | PaulWinex | v2.0',
widthHeight=[390,270])
cmds.columnLayout(adjustableColumn=True)
cmds.frameLayout( label='Naming' )
self.elementName = cmds.textFieldGrp(label='Element Name')
self.sideNameMenu = cmds.optionMenuGrp( label='Side',columnWidth=(2, 180) )
for k in '','center','left','right','lower','upper':
cmds.menuItem( label=k )
cmds.setParent( '..' )
cmds.frameLayout( label='Orient collision plane to' )
cmds.rowLayout( numberOfColumns=4)
cmds.columnLayout()
collection1 = cmds.radioCollection()
self.rbMeshNormal = cmds.radioButton( label='Mesh Normal', sl=1 )
self.rbRigControl = cmds.radioButton( label='Rig Control' )
cmds.setParent( '..' )
cmds.columnLayout()
self.fromCamera = cmds.radioButton( label='From Camera' )
self.ontocamera = cmds.radioButton( label='Onto Camera' )
cmds.setParent( '..' )
cmds.columnLayout()
self.rbX = cmds.radioButton( label='X' )
self.rbY = cmds.radioButton( label='Y' )
self.rbZ = cmds.radioButton( label='Z' )
cmds.setParent( '..' )
cmds.columnLayout()
self.rbXn = cmds.radioButton( label='-X' )
self.rbYn = cmds.radioButton( label='-Y' )
self.rbZn = cmds.radioButton( label='-Z' )
cmds.setParent( '..' )
cmds.setParent( '..' )
cmds.frameLayout( label='Source Objects' )
cmds.rowLayout( numberOfColumns=3, columnWidth3=(90, 75, 40), adjustableColumn=2, columnAlign=(1, 'right'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)] )
cmds.text('Rig Control')
self.text2 = cmds.textField(editable=0)
self.set2 = cmds.button(label='set', c=partial(self.setObject,2))
cmds.setParent('..')
cmds.rowLayout( numberOfColumns=3, columnWidth3=(90, 75, 40), adjustableColumn=2, columnAlign=(1, 'right'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)] )
cmds.text('Collision Mesh')
self.text3 = cmds.textField(editable=0)
self.set3 = cmds.button(label='set', c=partial(self.setObject,3))
cmds.setParent('..')
cmds.setParent('..')
cmds.columnLayout(adjustableColumn=True)
self.export = cmds.button(label='Do setup', c=self.doSetup)
开发者ID:KiyoteruOgawa,项目名称:pw_matrix_collision_rig,代码行数:54,代码来源:matrix_collision_rig.py
示例19: createUI
def createUI (self, *pArgs):
if cmds.window(self.windowID, exists = True):
cmds.deleteUI(self.windowID)
cmds.window(self.windowID, title = 'normalizeUI', sizeable = True, resizeToFitChildren = True)
cmds.columnLayout(columnAttach = ('both', 5), columnWidth = 250)
#cmds.rowColumnLayout(numberOfColumns = 2, columnWidth = [(1,120), (2,120)], columnOffset = [(1, 'left', 3), (2, 'left', 3)])
cmds.rowLayout(numberOfColumns = 2, columnWidth2 = (125, 125), columnAlign2 = ("right", "center") )
cmds.text(label = 'scaling factor:', width = 100, align = 'right')
scalingFactorField = cmds.floatField(value = 1.0, minValue = 0.1, maxValue = 10, step = 0.1, precision = 2, width = 100)
cmds.setParent('..')
#cmds.rowLayout(numberOfColumns = 1, columnWidth1 = (250), columnAlign1 = "center")
cmds.text(label = '---------- Position ----------')
cmds.rowLayout(numberOfColumns = 3, columnWidth3 = (80, 80, 80))
centerMethod = cmds.radioCollection()
avPoint = cmds.radioButton("centerPoint", label = 'center', select = 1)
centroid = cmds.radioButton("centroidPoint", label = 'centroid')
centerOBB = cmds.radioButton("centerOBB", label = 'OBB')
cmds.setParent('..')
cmds.rowLayout(numberOfColumns = 2, columnWidth2 = (125, 125))
transToZero = cmds.checkBox(label = 'set T = (0,0,0)', value = True)
pivToZero = cmds.checkBox(label = 'set piv = (0,0,0)', value = True)
cmds.setParent('..')
cmds.text(label = '---------- Orientation ----------')
cmds.rowLayout(numberOfColumns = 2, columnWidth2 = (125, 125))
alignToAxis = cmds.checkBox(label = 'align obj', value = True)
# create dropdown menu for different alignment obtions
axisOrder = cmds.optionMenu( label='axis order:')
cmds.menuItem( label='xyz' , p = axisOrder)
cmds.menuItem( label='xzy' , p = axisOrder)
cmds.menuItem( label='yxz' , p = axisOrder)
cmds.menuItem( label='yzx' , p = axisOrder)
cmds.menuItem( label='zxy' , p = axisOrder)
cmds.menuItem( label='zyx' , p = axisOrder)
cmds.optionMenu(axisOrder, e = 1, select = 4)
cmds.setParent('..')
cmds.rowLayout(numberOfColumns = 2, columnWidth2 = (125, 125))
fast = cmds.checkBox(label = 'fast calculation', value = False)
cmds.separator(h = 10, style = 'none')
cmds.setParent('..')
cmds.rowLayout(numberOfColumns = 2, columnWidth2 = (125, 125), columnAlign2 = ("center", "center"))
cmds.button(label = 'apply', command = partial(self.__applyCallback, scalingFactorField, transToZero, pivToZero, alignToAxis, axisOrder, fast, centerMethod) , width = 80)
cmds.button(label = 'cancel', command = self.__cancelCallback, width = 80)
#cmds.window("wNormalize", e = 1, wh = [250,120])
cmds.showWindow()
开发者ID:EnReich,项目名称:ProKlaue,代码行数:53,代码来源:normalize.py
示例20: UIqury
def UIqury(self):
jointA = cmds.textField('jointA',q = True,text = True)
jointB = cmds.textField('jointB',q = True,text = True)
if cmds.radioButton( 'Replace',q = True,sl=True) == True:
paint_operation = 'Replace'
if cmds.radioButton( 'Add',q = True,sl=True) == True:
paint_operation = 'Add'
Opacity = cmds.floatSliderGrp('Opacity',q = True,value=True)
Value = cmds.floatSliderGrp('Value',q = True,value=True)
weightValue = Opacity * Value
print paint_operation,weightValue
return jointA,jointB,paint_operation,weightValue
开发者ID:wangqinghuaTudou,项目名称:test,代码行数:12,代码来源:weightEdit.py
注:本文中的maya.cmds.radioButton函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论