本文整理汇总了Python中maya.cmds.textFieldButtonGrp函数的典型用法代码示例。如果您正苦于以下问题:Python textFieldButtonGrp函数的具体用法?Python textFieldButtonGrp怎么用?Python textFieldButtonGrp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了textFieldButtonGrp函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: jointPerVertexUI
def jointPerVertexUI():
"""
UI for jointPerVertex()
"""
# Window
win = "jntPerVtxUI"
if cmds.window(win, q=True, ex=1):
cmds.deleteUI(win)
win = cmds.window(win, t="Create Joint Per Vertex")
# Layout
cl = cmds.columnLayout()
# UI Elements
prefixTFG = cmds.textFieldGrp("jntPerVtx_prefixTFG", label="Prefix", text="")
suffixTFG = cmds.textFieldGrp("jntPerVtx_suffixTFG", label="Suffix", text="jnt")
oriSurfaceTFB = cmds.textFieldButtonGrp(
"jntPerVtx_oriSurfaceTFB", label="Orient Surface", text="", buttonLabel="Load Selected"
)
# Buttons
createB = cmds.button("jntPerVtx_createB", l="Create", c="glTools.tools.jointPerVertex.jointPerVertexFromUI(False)")
cancelB = cmds.button("jntPerVtx_cancelB", l="Cancel", c='cmds.deleteUI("' + win + '")')
# UI callbacks
cmds.textFieldButtonGrp(oriSurfaceTFB, e=True, bc='glTools.ui.utils.loadObjectSel("' + oriSurfaceTFB + '","")')
# Show Window
cmds.showWindow(win)
开发者ID:bennymuller,项目名称:glTools,代码行数:29,代码来源:jointPerVertex.py
示例2: loadDirectoryPath
def loadDirectoryPath(textField,caption='Load Directory',startDir=None):
'''
Select a file path to load into a specified textField.
@param textField: TextField UI object to load file path to
@type textField: str
@param caption: File selection UI caption string
@type caption: str
@param startDir: Directory to start browsing from. In None, use the default or last selected directory.
@type startDir: str
'''
# Get File Path
dirPath = mc.fileDialog2( dialogStyle=2,
fileMode=3,
caption=caption,
okCaption='Load',
startingDirectory=startDir )
# Check File Path
if not dirPath:
print('Invalid directory path!')
return
# Load File Path to TextField
if mc.textField(textField,q=True,ex=True):
mc.textField(textField,e=True,text=dirPath[0])
elif mc.textFieldGrp(textField,q=True,ex=True):
mc.textFieldGrp(textField,e=True,text=dirPath[0])
elif mc.textFieldButtonGrp(textField,q=True,ex=True):
mc.textFieldButtonGrp(textField,e=True,text=dirPath[0])
else:
print('UI element "'+textField+'" is of type "'+mc.objectTypeUI(textField)+'"! Expected textField, textFieldGrp or textFieldButtonGrp.')
return
# Return Result
return dirPath[0]
开发者ID:auqeyjf,项目名称:glTools,代码行数:35,代码来源:utils.py
示例3: 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
示例4: get_ui_values
def get_ui_values():
global engine_path, folder, file_name, export_batch, resolution_x, resolution_y, exposure, gamma, \
ray_number, time, seed, export_animation, start_frame, end_frame, export_normals, invert_normals, check_Z, materials
engine_path = cmds.textFieldButtonGrp(engine_field, query=True, text=True)
folder = cmds.textFieldButtonGrp(directory_field, query=True, text=True)
file_name = cmds.textFieldGrp(file_field, query=True, text=True)
export_batch = cmds.checkBoxGrp(batch_field, query=True, value1=True)
resolution_x = cmds.intFieldGrp(resolution_field, query=True, value1=True)
resolution_y = cmds.intFieldGrp(resolution_field, query=True, value2=True)
exposure = cmds.floatSliderGrp(exposure_field, query=True, value=True)
gamma = cmds.floatSliderGrp(gamma_field, query=True, value = True)
ray_number = cmds.intSliderGrp(rays_field, query=True, value=True)
seed = cmds.intSliderGrp(seed_field, query=True, value=True)
time = cmds.intSliderGrp(time_field, query=True, value=True)
export_animation = cmds.checkBoxGrp(animation_field, query=True, value1=True)
start_frame = cmds.intFieldGrp(frame_range_field, query=True, value1=True)
end_frame = cmds.intFieldGrp(frame_range_field, query=True, value2=True)
export_normals = cmds.checkBoxGrp(normals_export_field, query=True, value1=True)
invert_normals = cmds.checkBoxGrp(normals_invert_field, query=True, value1=True)
check_Z = cmds.checkBoxGrp(check_Z_field, query = True, value1=True)
materials = []
for mat in range(5):
materials.append(cmds.floatFieldGrp(eval('material_%i_field' % (mat)), query=True, value=True))
开发者ID:B-Rich,项目名称:zenphoton,代码行数:27,代码来源:export_hqz_maya25.py
示例5: cacheFilePath
def cacheFilePath(self, *args):
filename = mc.file(q=1, sn=1)
scenename = filename.rsplit('_', 4)[1]
shotname = filename.rsplit('_', 3)[1]
cachePath = self.basePath + '/' + scenename + '/' + shotname
mc.textFieldButtonGrp(self.txtProp, e = True, text = cachePath)
return cachePath
开发者ID:chuckbruno,项目名称:Python_scripts,代码行数:7,代码来源:核心脚本.py
示例6: linkShaders
def linkShaders(self, *args):
links = self.getLinksFromDB()
if links == None:
return
selection = cmds.ls(sl=True)
if len(selection) > 0:
selection = cmds.listRelatives(selection, allDescendents=True, noIntermediate=True)
# If shader file is available import it
shaderPath = cmds.textFieldButtonGrp("tfbShaderPath", q=True, tx=True)
if len(shaderPath) > 0:
cmds.file(shaderPath, i=True)
cmds.textFieldButtonGrp("tfbShaderPath", e=True, tx="")
# Link shaders
for link in links:
mesh = link[0]
shader = link[1]
if cmds.checkBox("cbSubstring", q=True, value=True):
substring = cmds.textField("tfSubstring", q=True, text=True)
mesh = substring + mesh
if cmds.objExists(mesh):
cmds.select(mesh)
cmds.hyperShade(assign=shader)
print "'" + mesh + "' linked"
print "Finished linking."
开发者ID:Quazo,项目名称:breakingpoint,代码行数:32,代码来源:jf_shaderLinker.py
示例7: locatorCurveUI
def locatorCurveUI():
'''
UI for locatorCurve()
'''
# Window
window = 'locatorCurveUI'
if mc.window(window,q=True,ex=1): mc.deleteUI(window)
window = mc.window(window,t='Locator Curve')
# Layout
cl = mc.columnLayout()
# UI Elements
#---
# Curve
curveTFB = mc.textFieldButtonGrp('locatorCurveTFB',label='Source Curve',text='',buttonLabel='Load Selected')
# Prefix
prefixTFG = mc.textFieldGrp('locatorCurvePrefixTFG',label='Prefix', text='')
# Scale
scaleFSG = mc.floatSliderGrp('locatorCurveScaleFSG',label='Locator Scale',field=True,minValue=0.0,maxValue=1.0,fieldMinValue=0.0,fieldMaxValue=10.0,value=0.05,pre=3)
# Edit Points
editPointCBG = mc.checkBoxGrp('locatorCurveEditPointCBG',numberOfCheckBoxes=1,label='Use Edit Points',v1=False)
# Buttons
createB = mc.button('locatorCurveCreateB',l='Create',c='glTools.ui.curve.locatorCurveFromUI(False)')
cancelB = mc.button('locatorCurveCancelB',l='Cancel',c='mc.deleteUI("'+window+'")')
# TFB commands
mc.textFieldButtonGrp(curveTFB,e=True,bc='glTools.ui.utils.loadCurveSel("'+curveTFB+'","'+prefixTFG+'")')
# Show Window
mc.showWindow(window)
开发者ID:auqeyjf,项目名称:glTools,代码行数:29,代码来源:curve.py
示例8: import2dTrackUI
def import2dTrackUI():
"""
"""
# Build UI Window
window = 'import2dTrackUI'
if cmds.window(window, q=True, ex=True): cmds.deleteUI(window)
window = cmds.window(window, title='Import 2D Track', wh=[500, 350])
# Build UI Elements
cmds.columnLayout(adjustableColumn=True)
perspCamListTSL = cmds.textScrollList('importTrack_camListTSL', numberOfRows=8, ams=False)
fileTFB = cmds.textFieldButtonGrp('importTrack_fileTFB', label='2D Track File', buttonLabel='Browse')
cmds.textFieldButtonGrp(fileTFB, e=True, bc='glTools.ui.utils.loadFilePath("' + fileTFB + '",fileFilter="*.*")')
cmds.textFieldGrp('importTrack_nameTFG', label="Point Name", text='trackPoint1')
cmds.floatFieldGrp('importTrack_widthFFG', numberOfFields=1, label='Source Pixel Width', value1=2348)
cmds.floatFieldGrp('importTrack_heightFFG', numberOfFields=1, label='Source Pixel Height', value1=1566)
cmds.button(label='Import Track',
c='import glTools.tools.import2dTrack;reload(glTools.tools.import2dTrack);glTools.tools.import2dTrack.import2dTrack()')
cmds.button(label='Close', c='cmds.deleteUI("' + window + '")')
# Build Camera List
camList = cmds.listCameras(p=True)
for cam in camList: cmds.textScrollList(perspCamListTSL, e=True, a=cam)
# Show Window
cmds.showWindow(window)
开发者ID:bennymuller,项目名称:glTools,代码行数:26,代码来源:import2dTrack.py
示例9: snapToClosestVertexUI
def snapToClosestVertexUI():
'''
UI for snapToClosestVertex()
'''
# Window
window = 'snapToClosestVtxUI'
if mc.window(window,q=True,ex=1): mc.deleteUI(window)
window = mc.window(window,t='Snap To Closest Vertex')
# Layout
FL = mc.formLayout(numberOfDivisions=100)
# ===============
# - UI Elements -
# ===============
# Mesh
meshTFB = mc.textFieldButtonGrp('snapToMeshVtxTFB',label='Target Mesh',text='',buttonLabel='Load Selected')
# UI callback commands
mc.textFieldButtonGrp(meshTFB,e=True,bc='glTools.ui.utils.loadMeshSel("'+meshTFB+'")')
# Buttons
snapB = mc.button('snapToMeshSnapB',l='Snap To Vertex',c='glTools.ui.mesh.snapToClosestVertexFromUI(False)')
cancelB = mc.button('snapToMeshCancelB',l='Cancel',c='mc.deleteUI("'+window+'")')
# Form Layout - MAIN
mc.formLayout(FL,e=True,af=[(meshTFB,'top',5),(meshTFB,'left',5),(meshTFB,'right',5)])
mc.formLayout(FL,e=True,ac=[(snapB,'bottom',5,cancelB)],af=[(snapB,'left',5),(snapB,'right',5)])
mc.formLayout(FL,e=True,af=[(cancelB,'left',5),(cancelB,'right',5),(cancelB,'bottom',5)])
# Show Window
mc.showWindow(window)
开发者ID:auqeyjf,项目名称:glTools,代码行数:33,代码来源:mesh.py
示例10: multObjExport
def multObjExport():
uiWindow_objLoopExport = cmds.window('uiWindow_objLoopExport', title="Mass OBJ exporter", iconName='uiWindow_objLoopExport', widthHeight=(330, 160) )
cmds.columnLayout('uiColWrapper', w = 375, adjustableColumn=False, parent = 'uiWindow_objLoopExport' )
cmds.text( label='Settings', align='left', parent = 'uiColWrapper')
cmds.textFieldButtonGrp('Dir', label='Directory Path', cw3 = [80,190,50], text='(browse for directory)', buttonLabel='browse', buttonCommand=browseIt, parent = 'uiColWrapper')
cmds.button('startExport', label = "Export Selected", parent = 'uiColWrapper', width = 322, command = startExport)
cmds.showWindow( uiWindow_objLoopExport )
开发者ID:aaronfang,项目名称:personal_scripts,代码行数:7,代码来源:multObjExport.py
示例11: stretchyIkSplineFromUI
def stretchyIkSplineFromUI(close=False):
'''
'''
# Window
window = 'stretchyIkSplineUI'
if not mc.window(window,q=True,ex=1): raise UIError('StretchyIkSpline UI does not exist!!')
# Get UI data
ik = mc.textFieldButtonGrp('stretchyIkSplineTFB',q=True,text=True)
pre = mc.textFieldGrp('stretchyIkSplinePrefixTFG',q=True,text=True)
scaleAxis = str.lower(str(mc.optionMenuGrp('stretchyIkSplineAxisOMG',q=True,v=True)))
scaleAttr = mc.textFieldButtonGrp('stretchyIkSplineScaleAttrTFB',q=True,text=True)
blendCtrl = mc.textFieldButtonGrp('stretchyIkSplineBlendCtrlTFB',q=True,text=True)
blendAttr = mc.textFieldGrp('stretchyIkSplineBlendAttrTFG',q=True,text=True)
method = mc.optionMenuGrp('stretchyIkSplineMethodOMG',q=True,sl=True)-1
minPercent = mc.floatSliderGrp('stretchyIkSplineMinPFSG',q=True,v=True)
maxPercent = mc.floatSliderGrp('stretchyIkSplineMaxPFSG',q=True,v=True)
# Execute command
if method: # Parametric
glTools.builder.stretchyIkSpline_parametric.StretchyIkSpline_parametric().build(ikHandle=ik,scaleAttr=scaleAttr,blendControl=blendCtrl,blendAttr=blendAttr,scaleAxis=scaleAxis,minPercent=minPercent,maxPercent=maxPercent,prefix=pre)
else: # Arc Length
glTools.builder.stretchyIkSpline_arcLength.StretchyIkSpline_arcLength().build(ikHandle=ik,scaleAttr=scaleAttr,blendControl=blendCtrl,blendAttr=blendAttr,scaleAxis=scaleAxis,prefix=pre)
# Cleanup
if close: mc.deleteUI(window)
开发者ID:RiggingDojoAdmin,项目名称:glTools,代码行数:26,代码来源:ik.py
示例12: __init__
def __init__(self): #(Initialization)
### Initialize, definitions
if(mc.window("ms_orientObject",exists=True)):
mc.deleteUI("ms_orientObject",window=True)
mc.window("ms_orientObject",title="Orient Object v1.0",rtf=True)
mc.columnLayout()
mc.text(" ")
mc.rowLayout(nc=4,cw4=(25,130,150,200) )
mc.text(" ")
mc.text("Orient object A to object B.")
mc.text("Unparents during operation, so ")
mc.text("constraints should not be applied yet.")
mc.setParent("..")
mc.text(" ")
mc.separator(w=500)
self.aObjFld = mc.textFieldButtonGrp( label='Object A:',bl='Load',bc=self.loadAObj,text='pCube1')
self.bObjFld = mc.textFieldButtonGrp( label='Object B:',bl='Load',bc=self.loadBObj,text='inside_cube_small')
mc.separator(w=500)
mc.rowLayout(nc=2,cw2=(200,300))
mc.text(" ")
mc.button(label="-=Match Orientation=-",c=self.orient)
mc.setParent("..")
mc.showWindow("ms_orientObject")
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:28,代码来源:ms_orientObject.py
示例13: getChannel
def getChannel(tfbg, *args):
"""gets the selected channel of the selected objects"""
obj = ""
channel = ""
cBox = mel.eval('$temp=$gChannelBoxName')
sel = cmds.ls(sl=True, l=True)
if sel:
if not len(sel)==1:
cmds.warning("You have to select ONE node!")
else:
obj = sel[0]
else:
cmds.warning("You have to select ONE node!")
if sel:
channels = cmds.channelBox(cBox, q=True, sma=True, ssa=True, sha=True, soa=True)
if channels:
if not len(channels) == 1:
cmds.warning("You have to select ONE channel!")
else:
channel = channels[0]
else:
cmds.warning("You have to select ONE channel!")
if obj and channel:
full = "%s.%s"%(obj, channel)
cmds.textFieldButtonGrp(widgets[tfbg], e=True, tx=full)
开发者ID:zethwillie,项目名称:zbw_python_tools,代码行数:31,代码来源:zbw_attributes.py
示例14: jointPerVertexUI
def jointPerVertexUI():
'''
UI for jointPerVertex()
'''
# Window
win = 'jntPerVtxUI'
if mc.window(win,q=True,ex=1): mc.deleteUI(win)
win = mc.window(win,t='Create Joint Per Vertex')
# Layout
cl = mc.columnLayout()
# UI Elements
prefixTFG = mc.textFieldGrp('jntPerVtx_prefixTFG',label='Prefix', text='')
suffixTFG = mc.textFieldGrp('jntPerVtx_suffixTFG',label='Suffix', text='jnt')
oriSurfaceTFB = mc.textFieldButtonGrp('jntPerVtx_oriSurfaceTFB',label='Orient Surface',text='',buttonLabel='Load Selected')
# Buttons
createB = mc.button('jntPerVtx_createB',l='Create',c='glTools.tools.jointPerVertex.jointPerVertexFromUI(False)')
cancelB = mc.button('jntPerVtx_cancelB',l='Cancel',c='mc.deleteUI("'+win+'")')
# UI callbacks
mc.textFieldButtonGrp(oriSurfaceTFB,e=True,bc='glTools.ui.utils.loadObjectSel("'+oriSurfaceTFB+'","")')
# Show Window
mc.showWindow(win)
开发者ID:RiggingDojoAdmin,项目名称:glTools,代码行数:26,代码来源:jointPerVertex.py
示例15: setShaderPath
def setShaderPath(self, *args):
fileFilters = "Maya File(*.mb *.ma)"
path = cmds.fileDialog2(fileMode=1, caption="Set Shader Path", dialogStyle=2, okCaption="Save", startingDirectory=self.basedir, fileFilter=fileFilters)
if path == None:
return
cmds.textFieldButtonGrp("tfbShaderPath", e=True, tx=path[0])
开发者ID:Quazo,项目名称:breakingpoint,代码行数:7,代码来源:jf_shaderLinker.py
示例16: __init__
def __init__(self):
self.name = "pythant"
self.title = "Pythant"
#creates the ui window, replacing any existing ui windows
if (cmds.window(self.name, q=1, exists=1)):
cmds.deleteUI(self.name)
self.window = cmds.window(self.name, title=self.title)
self.form = cmds.columnLayout(adjustableColumn=True, columnAlign="center", rowSpacing=10)
cmds.intFieldGrp("numAnts", label="Number of ants:", value1=1, cal=[1,"left"])
cmds.intFieldGrp("startFrame", label="Start frame:", value1=1, nf=1,cal=[1,"left"])
cmds.intFieldGrp("endFrame", label="End frame:",nf=1,value1=50,cal=[1,"left"])
cmds.text( label="Select the curves:",align="left")
cmds.textScrollList("curves",numberOfRows=3,allowMultiSelection=True,h=100)
cmds.button(label="OK",w=20, align="left",c=self.getCurves)
cmds.textFieldButtonGrp("groundObj", label="Select the Ground:",buttonLabel='OK', bc=self.getGround,cal=[1,"left"])
cmds.checkBox("isFlat",label="Is this a flat ground",value=1)
cmds.floatSliderGrp("Velocity",field=True, label="Velocity (mm/s):",min=1, max=40,value=20, cal=[1,"left"])
#cmds.floatSliderGrp("strideFreq",field=True, label="Stride Frequency:",min=1, max=10,value=5, cal=[1,"left"])
cmds.floatSliderGrp("load",field=True, label="Load (mg):",min=0, max=4,value=0, cal=[1,"left"])
# cmds.textFieldButtonGrp("force", label="External Force", buttonLabel='OK', bc = self.getForce, cal=[1, "left"])
cmds.text( label='The external force is setup with a directional light named forceVector.')
cmds.text( label='The force magnitude (N) is specified with the custom attribute "Force Magnitude".')
cmds.text(label='The lighting direction is the force direction.')
cmds.button(label='Run', w=100, c=self.accept)
cmds.button(label='Reset', w=100, c=self.reset)
cmds.showWindow(self.window)
cmds.window(self.window, edit = True, widthHeight=(415, 580))
开发者ID:shihuiguo,项目名称:pythant,代码行数:30,代码来源:pythant.py
示例17: setDBPath
def setDBPath(self, *args):
fileFilters = "Database (*.db *.sqlite) (*.db *.sqlite)"
path = cmds.fileDialog2(fileMode=1, caption="Open .db File", dialogStyle=2, okCaption="Open", startingDirectory=self.basedir, fileFilter=fileFilters)
if path == None:
return
cmds.textFieldButtonGrp("tfbDBPath", e=True, tx=path[0])
开发者ID:Quazo,项目名称:breakingpoint,代码行数:7,代码来源:jf_shaderLinker.py
示例18: loadSelIntoTFBG
def loadSelIntoTFBG(tfbg):
objs = mc.ls(sl=True)
if len(objs)>0:
mc.textFieldButtonGrp(tfbg,e=True,tx=objs[0])
print mc.textFieldButtonGrp(tfbg,q=True,tx=True)
开发者ID:WaterKai,项目名称:maya_melPython,代码行数:7,代码来源:ex2.py
示例19: buildGUI
def buildGUI(self):
if cmds.window(self.name, q=True, exists=True):
cmds.deleteUI(self.name)
cmds.window(self.name, title=self.title, sizeable=False, mxb=False, mnb=False, toolbox=False, w=100, h=30)
cmds.columnLayout("mainLayout", adj=True, parent=self.name, co=("left", 5))
# Add onClose Event
cmds.scriptJob(uiDeleted=(self.name, self.onClose))
# Help Menu
cmds.menuBarLayout("menuBar")
cmds.menu(label="Show Help", helpMenu =True, pmc=self.showHelp)
# Import paths
cmds.textFieldButtonGrp("tfbDBPath", label="Links: ", bl="Set Link Path", cw=(1,50), parent="mainLayout", bc=self.setDBPath)
cmds.textFieldButtonGrp("tfbShaderPath", label="Shaders: ", bl="Set Shader Path", cw=(1,50), parent="mainLayout", bc=self.setShaderPath)
cmds.checkBox("cbSelection", label="Use Selection", parent="mainLayout")
cmds.checkBox("cbSubstring", label="Substring prefix", parent="mainLayout", value=True)
cmds.textField("tfSubstring", parent="mainLayout", text="s100_char")
cmds.separator(h=10, style="none", parent="mainLayout")
# Buttons
cmds.rowColumnLayout("buttonsLayout", numberOfColumns=2, parent="mainLayout")
cmds.button("bExportLinks", label = "Export Links", w=200, h=30, parent="buttonsLayout", c=self.exportLinks)
cmds.button("bImportShader", label="Link Shaders", w=200, h=30, parent="buttonsLayout", c=self.linkShaders)
cmds.showWindow(self.name)
开发者ID:Quazo,项目名称:breakingpoint,代码行数:30,代码来源:jf_shaderLinker.py
示例20: browseDirectory
def browseDirectory(rootDir, control):
"""browseDirectory
:param rootDir:
:param control:
:return:
"""
path = cmds.textFieldButtonGrp(control, q=True, text=True)
startDir = path
if isRelative(path):
startDir = os.path.join(rootDir, path)
dirNames = cmds.fileDialog2(
fileMode=3,
startingDirectory=startDir,
dialogStyle=1
)
if dirNames is not None:
dirName = cmds.workspace(projectPath=fromNativePath(dirNames[0]))
cmds.textFieldButtonGrp(
control,
e=True,
text=dirName,
forceChangeCommand=True
)
开发者ID:AlbertR,项目名称:cgru,代码行数:27,代码来源:maya_ui_proc.py
注:本文中的maya.cmds.textFieldButtonGrp函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论