当前位置: 首页>>代码示例>>Python>>正文


Python cmds.image函数代码示例

本文整理汇总了Python中maya.cmds.image函数的典型用法代码示例。如果您正苦于以下问题:Python image函数的具体用法?Python image怎么用?Python image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了image函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self):
        if cmds.window('ms_info_window', query=True, exists=True):
            cmds.deleteUI('ms_info_window')

        window = cmds.window('ms_info_window', title='About Mayaseed', sizeable=False)

        cmds.columnLayout(rs=10, columnOffset=['both', 20], width=600)

        cmds.rowLayout(numberOfColumns=2)
        cmds.text('', width=30)
        cmds.image(image=os.path.join(ROOT_DIRECTORY, 'graphics', 'mayaseed.png'))
        cmds.setParent('..')

        cmds.text('Version ' + MAYASEED_VERSION)
        cmds.text('Mayaseed is a Maya plugin for exporting scenes to the appleseed renderer.')
        cmds.text('Written by Jonathan Topf.')

        cmds.rowLayout(numberOfColumns=4)
        cmds.button(label='Mayaseed website', command=('import webbrowser\nwebbrowser.open_new_tab("' + MAYASEED_URL + '")'))
        cmds.button(label='appleseed website', command=('import webbrowser\nwebbrowser.open_new_tab("' + APPLESEED_URL + '")'))
        cmds.text('', width=166)
        cmds.button(label='Close', command=('import maya.cmds as cmds\ncmds.deleteUI(\"' + window + '\", window=True)'), width=100)
        cmds.setParent('..')

        cmds.text('')

        cmds.setParent('..')

        cmds.showWindow(window)
开发者ID:hipopotamo-hipotalamo,项目名称:appleseed,代码行数:29,代码来源:ms_commands.py

示例2: nu

	def nu(self):
		if(cmds.window(self.win, q = 1, ex = 1)):
			cmds.deleteUI(self.win)
		if(cmds.windowPref(self.win, ex = True)):
			cmds.windowPref(self.win, r = True)

		cmds.window(self.win, t = "Export as FBX", h = 170, w = 250,rtf=1,s=0)
		mainCol = cmds.columnLayout()
		cmds.columnLayout()
		cmds.image( image="//10.10.35.93/data/_3dAppDomain/_images/maya_export_fbx.png",w=250,h=45 )
		cmds.text(label="")
		uRow = cmds.columnLayout()
		#zRow = cmds.rowLayout(numberOfColumns=1,cl1="left",cw1=170,ct1="left")
		cmds.button(label='click to set preset file')		
		#cmds.setParent(zRow)
		tRow = cmds.rowLayout(numberOfColumns=2,cl2=("right","left"),cw2=(170,70),ct2=("right","left"))

		self.expPath = cmds.textField()
		cmds.textField( self.expPath , edit=True, width = 140, enterCommand=('cmds.setFocus(\"' + self.expPath + '\")') )
		cmds.button(label='Browse',command='obj.abc()')
		cmds.setParent(tRow)
		cmds.setParent(uRow)
		cmds.text(label = " ")
		sRow = cmds.rowLayout(numberOfColumns=2,cl2=("center","center"),cw2=(120,130),ct2=("both","both"),co2=(10,05))
		butExp = cmds.button( label='Push Export', command='obj.sortAndExport()')
		cmds.button( label=" Close ", command=("obj.close()"))
		cmds.setParent(sRow)
		cmds.setParent(mainCol)
#		cmds.text(label="")
		cmds.showWindow(self.win)
开发者ID:teddygo,项目名称:codha,代码行数:30,代码来源:+maya_Stereo_Fbx.py

示例3: createLayout

 def createLayout(self):     
    
     mainLayout = cmds.rowLayout(numberOfColumns=6, parent=self.parentLayout)
     
     #manipulator orientation
     #cmds.iconTextButton("manipOrientButton", style='textOnly',  label='-', h=self.hb, annotation="Selected objects", command=updateManipOrient)  
     #launchManipOrient()
     
     self.autoSmartSnapKeys       = AutoSmartSnapKeys()
     self.selectionCounter        = SelectionCounter()
       
     #selection        
     cmds.iconTextButton("selectionCounterButton", style='textOnly', font="smallPlainLabelFont", label='0', h=self.hb, annotation="Selected objects")  
     cmds.popupMenu("selectionCounterButtonMenu", button=1, postMenuCommand=self.selectionCounter.populateMenu)      
     
     #animation crash recovery
     cmds.image("animationCrashRecoveryLed", w=14, h=14, annotation="Test")  
             
     #menu
     cmds.iconTextButton(style='iconOnly',   w=self.wb, h=self.hb, image= uiMod.getImagePath("aTools"), highlightImage= uiMod.getImagePath("aTools copy"), annotation="aTools Menu")
     self.popUpaToolsMenu()
      
     self.update = Update()
     self.update.about = self.about
     self.update.checkUpdates(self, mainLayout)
  
     # set default config and startup scripts
     self.setDefaultConfig() 
开发者ID:Italic-,项目名称:maya-prefs,代码行数:28,代码来源:generalToolsUI.py

示例4: editCharacter

def editCharacter(*args):
    
    if cmds.window("artEditCharacterUI", exists = True):
        cmds.deleteUI("artEditCharacterUI")
    
    window = cmds.window("artEditCharacterUI", w = 300, h = 400, title = "Edit Character", mxb = False, mnb = False, sizeable = False)
    mainLayout = cmds.columnLayout(w = 300, h = 400, rs = 5, co = ["both", 5])
    
    #banner image
    toolsPath = cmds.internalVar(usd = True) + "mayaTools.txt"
    if os.path.exists(toolsPath):
        
        f = open(toolsPath, 'r')
        mayaToolsDir = f.readline()
        f.close()
	
    cmds.image(w = 300, h = 50, image = mayaToolsDir + "/General/Icons/ART/artBanner300px.bmp", parent = mainLayout)
    
    cmds.text(label = "", h = 1, parent = mainLayout)
    optionMenu = cmds.optionMenu("artProjOptionMenu", label = "Project:", w =290, h = 40, cc = getProjCharacters, parent = mainLayout)
    textScrollList = cmds.textScrollList("artProjCharacterList", w = 290, h = 300, parent = mainLayout)
    button = cmds.button(w = 290, h = 40, label = "Edit Export File", c = editSelectedCharacter, ann = "Edit the character's skeleton settings, joint positions, or skin weights.", parent = mainLayout)
    button2 = cmds.button(w = 290, h = 40, label = "Edit Rig File", c = editSelectedCharacterRig, ann = "Edit the character's control rig that will be referenced in by animation.", parent = mainLayout)
    
    cmds.text(label = "", h = 1)
    
    
    cmds.showWindow(window)
    getProjects()
    getProjCharacters()
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:30,代码来源:customMayaMenu.py

示例5: arnoldAboutDialog

def arnoldAboutDialog():
    arnoldAboutText =  u"Arnold for Maya\n\n"
    arnoldAboutText += "MtoA " + cmds.pluginInfo( 'mtoa', query=True, version=True)
    arnoldMercurialID = cmds.arnoldPlugins(getMercurialID=True)
    if not '(Master)' in arnoldMercurialID:
        arnoldAboutText += " - " + arnoldMercurialID
    arnoldAboutText += "\nArnold Core "+".".join(ai.AiGetVersion())+"\n\n"
    arnoldAboutText += u"(c) 2001-2009 Marcos Fajardo and (c) 2009-2015\nSolid Angle SL\n\n"
    arnoldAboutText += u"Developed by: Ángel Jimenez, Olivier Renouard,\nYannick Puech, Borja Morales, Nicolas Dumay,\nPedro Fernando Gomez, Pál Mezei\n\n"
    arnoldAboutText += u"Acknowledgements: Javier González, Miguel González, \nLee Griggs, Chad Dombrova, Gaetan Guidet, \nGaël Honorez, Diego Garcés, Kevin Tureski, \nFrédéric Servant"

    if (cmds.window("AboutArnold", ex=True)):
        cmds.deleteUI("AboutArnold")
    w = cmds.window("AboutArnold", title="About")
    cmds.window("AboutArnold", edit=True, width=402, height=280)
    cmds.rowColumnLayout( numberOfColumns=4, columnWidth=[(1,20), (2, 52), (3, 50), (4, 280)] )

    cmds.text(label="");cmds.text(label="");cmds.text(label="");cmds.text(label="")

    cmds.text(label="")
    cmds.image(image="MtoA_Logo.png")
    cmds.text(label="")
    cmds.text(align="left",label=arnoldAboutText)

    cmds.text(label="");cmds.text(label="\n");cmds.text(label="");cmds.text(label="")

    cmds.text(label="")
    cmds.text(label="")
    cmds.button( width=150,label='OK', command=('import maya.cmds as cmds;cmds.deleteUI(\"' + w + '\", window=True)') )
    cmds.setParent( '..' )
    
    cmds.showWindow(w)
开发者ID:Quazo,项目名称:breakingpoint,代码行数:32,代码来源:arnoldmenu.py

示例6: UI

def UI():
	# check to see if the window exists
	if cmds.window('exampleUI', exists = True):
		cmds.deleteUI('exampleUI')
	#create the window
	window = cmds.window('exampleUI', title = 'exampleUI', w = 300, h = 300, mnb  = False, mxb = False, sizeable = False)
	#show window
	cmds.showWindow(window)
	# create a main layout
	mainLayout = cmds.columnLayout(h = 300, w = 300)
	# banner image
	imagePath = cmds.internalVar(userPrefDir = True) + 'icons' + '/test.jpg' # find the path to the image
	cmds.image(w = 300, h = 100, image = imagePath)
	cmds.separator(h = 15)# just a seperator
	# projects option menu
	projectsOptionMenu = cmds.optionMenu ( 'projectsOptionMenu', width = 300, changeCommand = populateCharacters, label = 'choose a project:     ') # change command needed to update character option menu based on what project is selected
	# create a character option menu
	characerOptionMenu = cmds.optionMenu ( 'characerOptionMenu', width = 300, label = 'choose a character: ')
	cmds.separator(h = 15) # just a seperator
	# create the build button
	cmds.button(label = 'build', w = 300, h = 50 ,c = build)
	# activate populate projects option menu
	populateProjects()
	# activate populate characaters option menu
	populateCharacters()
开发者ID:jricker,项目名称:JR_Maya,代码行数:25,代码来源:WIP_UI_sceneOpen.py

示例7: errorWindow_NamingConvention

def errorWindow_NamingConvention():
	print "Something went wrong...."

	for image in [IMG_NAMING_CONVENTION, IMG_FOLDERSTRUKTURE]:
		cmds.window(title="Read this !!!", sizeable=False)
		cmds.columnLayout()
		cmds.image(image = image)
		cmds.showWindow()
开发者ID:Loqy,项目名称:Kroetenlied_Pipeline,代码行数:8,代码来源:mayaUtils.py

示例8: UI

def UI():
    #check to see if window exists
    if cmds.window("mkProjects", exists=True):
        cmds.deleteUI("mkProjects")

    #main window
    window = cmds.window("mkProjects", title="Project Quick Load", width=400, 
                        height=300, mnb=False, mxb=False, sizeable=False)

    #main layout
    mainLayout = cmds.columnLayout(width=400, height=300)

    #banner image
    imagePath = path.join(cmds.internalVar(upd=True), 'icons', 'mkProjects.jpg')
    #load image
    cmds.image(width=400, height=100, image=imagePath)

    cmds.separator(height=15)
    cmds.textField('location', width=400, editable=False, 
        text=getDefaultProject())

    #create projects option menu
    projectsOptionMenu = cmds.optionMenu("projectsOptionMenu", width=400, 
        label="Choose a project: ", cc=populateScenes)

    #populate projects with maya default project location
    populateProjects()

    cmds.separator(height=15)
    rowLayout = cmds.rowLayout(nc=2)

    #List Control
    scenesList = cmds.textScrollList("scenesList", 
        allowMultiSelection=False, width=300, dcc=loadFile)
    populateScenes()

    colLayout = cmds.columnLayout()
    cmds.button(label="Set Location", width=95, height=30, c=setLocation)
    cmds.separator(height=5)
    cmds.button(label="Create Project", width=95, height=30, 
        c=cmds.ProjectWindow)
    cmds.separator(height=5)
    cmds.button(label="Open Project", width=95, height=30, c=openProject)
    cmds.separator(height=5)
    cmds.button(label="Open Scenes", width=95, height=30, c=openScenes)
    cmds.separator(height=5)
    cmds.button(label="Open Textures", width=95, height=30, c=openTextures)
    cmds.separator(height=5)
    cmds.button(label="Open Renders", width=95, height=30, c=openRenders)

    #open scene button
    cmds.separator(height=15, parent=mainLayout)
    cmds.button(label="Load File", width=400, height=50, parent=mainLayout, 
        c=loadFile)

    #show window
    cmds.showWindow(window)
开发者ID:atvKumar,项目名称:mkProjects,代码行数:57,代码来源:mkProjects.py

示例9: __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

示例10: HdrlsLiveUI

def HdrlsLiveUI():	
	if cmds.window("HdrLightStudioLive", exists=True):
		cmds.deleteUI("HdrLightStudioLive")

	window = cmds.window("HdrLightStudioLive", w=300, h=350, mnb=False, mxb=False, sizeable=False, title="HDR Light Studio 4 Live")
	job1 = cmds.scriptJob(uiDeleted=[window, stopLiveSession])
	job2 = cmds.scriptJob(event=["quitApplication", stopLiveSession])

	#gfx that we need
	iconsPath = cmds.internalVar(upd=True) + "icons/"
	imageLogo = iconsPath + "HdrlsLogo.png"

	#create main layout
	mainLayout = cmds.columnLayout(w=300, h=350, columnOffset=["both", 5])

	#image logo location and image control
	cmds.separator(h=5)
	cmds.image(w=300, h=35, image=imageLogo)

	#renderer list
	cmds.separator(h=10)
	cmds.text(" Host Renderer")
	cmds.separator(h=2)
	exportFormatMenu = cmds.optionMenu("hostRendererMenu", w=300, changeCommand=hostRendererChanged)

	#text field for unavailable renderers
	cmds.separator(h=5)
	cmds.scrollField('rendererErrorText', text="Error will go here", w=300, h=70, visible=True, enable=False, ww=True)

	#environment hooks list
	cmds.separator(h=10)
	cmds.text(" Environment Hooks")
	cmds.separator(h=2)
	exportFormatMenu = cmds.optionMenu("envHooksMenu", w=300, changeCommand=envHookChanged)

	#refresh button for env hooks and sync to maya button to show in attribute editor
	cmds.separator(h=10)
	cmds.rowColumnLayout(nc=2, cw=[(1, 150), (2, 150)], columnOffset=[(1, "left", 15), (2, "right", 15)], parent=mainLayout)
	cmds.button(label="Refresh Env-Hooks", w=130, c=pushRefreshEnvHooks)
	cmds.button("syncToMaya", label="Show Hook In Maya", w=130, c=pushSyncMayaToEnvHooks)

	#Start/Stop Live Session
	cmds.separator(h=25)
	cmds.separator(h=25)
	cmds.button("initHdrls", label="Start Live", w=100, enable=True,c=pushStartLiveSession)
	cmds.button("exitHdrls", label="Stop Live", w=100, enable=True, c=pushExitLiveSession)
	cmds.separator(h=10, parent=mainLayout)

	#Version information
	cmds.text(HdrlsVersion.GetHdrlsScriptVersion(), parent=mainLayout, w=300, align="right", font="smallObliqueLabelFont")

	#populate initial lists
	populateHostRendererList()

	#show window
	cmds.showWindow(window)
开发者ID:michimussato,项目名称:PyPELyNE,代码行数:56,代码来源:HdrlsLiveUI.py

示例11: setLed

    def setLed(self, state):
        
        if not cmds.image("animationCrashRecoveryLed", query=True, exists=True): return
        
        self.blinkingRed(False)
        
        if state == "on":
            if self.saveRecommended:    
                image               = "ACR_red"
                ann                 = "Animation Crash Recovery recommends you to save"
                G.lastSaveWarning   = time.time() if not G.lastSaveWarning else G.lastSaveWarning
                
                if time.time() - G.lastSaveWarning >= self.redBlinkingSecs: self.blinkingRed(True)
                    
            else:                       
                image               = "ACR_green"
                ann                 = "Animation Crash Recovery is ON"
                G.lastSaveWarning   = None
            
            cmds.image("animationCrashRecoveryLed", edit=True, image= uiMod.getImagePath(image), ann=ann) 
            
        elif state == "off":
            cmds.image("animationCrashRecoveryLed", edit=True, image= uiMod.getImagePath("ACR_off"), ann="Animation Crash Recovery is OFF") 

        elif state == "blinking":
            self.blinkingLedState = not self.blinkingLedState
            image = "ACR_white_half" if self.blinkingLedState else "ACR_white_bright"
            cmds.image("animationCrashRecoveryLed", edit=True, image= uiMod.getImagePath(image), ann="Animation Crash Recovery is saving animation") 
            
        elif state == "blinking_red":
            self.blinkingLedState = not self.blinkingLedState
            image = "ACR_red_half" if self.blinkingLedState else "ACR_red_bright"
            cmds.image("animationCrashRecoveryLed", edit=True, image= uiMod.getImagePath(image), ann="Animation Crash Recovery HIGHLY recommends you to save") 
开发者ID:Italic-,项目名称:maya-prefs,代码行数:33,代码来源:animationCrashRecovery.py

示例12: __init__

	def __init__(self):

		# Collect Variables: Paths
		fullPath = str(cmds.file(sceneName=True, q=True))
		self.rootFolder = "/".join(fullPath.split("/")[:-1])

		# Collect Variables: SceneName-Parts
		try:
			sceneName = fullPath.split("/")[-1]
			self.assetName = sceneName.split("_")[0]
			self.taskName = sceneName.split("_")[1]
			self.artist = vuPipelineHelpers.getArtist()
			self.sceneType = sceneName.split(".")[-1]
		except:
			mayaUtils.errorWindow_NamingConvention()
			return

		self.version = "v" + ("000" + str(VersionControl.getLatest(self.rootFolder, up=1, getNum=True)))[-3:]

		self.window = cmds.window("klPipeline_SaveIncr", title="Krotenlied-Pipeline: SaveScene+1", sizeable=False)

		# Header
		cmds.columnLayout(parent=self.window)
		cmds.image(image = HEADER_PATH)
		cmds.separator(h=5, vis=True, st='none')

		cmds.rowColumnLayout(parent=self.window, numberOfColumns=6)

		# Labels
		cmds.text( al="left", w=75, label='Name')
		cmds.text( al="left", w=50, label='Task')
		cmds.text( al="left", w=50, label='Version' )
		cmds.text( al="left", w=40, label='Artist')
		cmds.text( al="left", w=200, label='Comment')
		cmds.text( al="left", w=25, label='')

		# TextFields
		cmds.textField(ed=False, w=75, tx=self.assetName)
		cmds.textField(ed=False, w=50, tx=self.taskName)
		cmds.textField(ed=False, w=50, tx=self.version)
		cmds.textField(ed=False, w=40, tx=self.artist)
		self.textComment = cmds.textField(w=200, enterCommand=self.btnSave)
		cmds.textField(ed=False, w=25, tx="." + self.sceneType)

		# Button
		cmds.rowColumnLayout(parent=self.window, numberOfColumns=2)

		cmds.separator(w=300, h=20, vis=True, st='none')
		cmds.separator(st='none')
		cmds.separator(st='none')
		cmds.button(h=30, w=100, label='Save+1', command=self.btnSave)

		cmds.showWindow()
		cmds.setFocus(self.textComment)
开发者ID:Loqy,项目名称:_OLD_FilmAK_Kroetenlied,代码行数:54,代码来源:saveIncr.py

示例13: imageViewer

 def imageViewer(self):
         """
         Click thumbnail to see enlarged image
         """
         selectedImage=os.path.join(cmds.textField('location',q=True,tx=True),cmds.textScrollList('fileLister',q=True,
                                                                                                  si=True)[0]).split(" > ")[0]
         for each in ["jpg","png",'tif',"iff"]:
                 if selectedImage.endswith(each):
                         window = cmds.window(t="Image Viewer")
                         cmds.paneLayout()
                         cmds.image( image=selectedImage)
                         cmds.showWindow( window )
开发者ID:sanfx,项目名称:pythonScripts,代码行数:12,代码来源:minime.py

示例14: _updateCommand

 def _updateCommand(self):
     items = self.ui_listwidget.selectedItems()
     self.ui_textedit.setText('')
     cmds.image('MMtoKeyPyIconWidget', e=True, vis=False)
     self.ui_textedit.setEnabled(False)
     self.ui_button.setEnabled(False)
     if items:
         self.ui_combobox.setCurrentIndex(items[0].getLanguage())
     if len(items) == 1:
         self.ui_textedit.setText(items[0].getCommand())
         cmds.image('MMtoKeyPyIconWidget', e=True, vis=True, i=items[0].ICON)
         self.ui_textedit.setEnabled(True)
         self.ui_button.setEnabled(True)
开发者ID:DavideAlidosi,项目名称:May9,代码行数:13,代码来源:Tools.py

示例15: findCharacterThumbnail

 def findCharacterThumbnail(self):
     project = cmds.optionMenu(self.widgets["project"], q=True, value=True)
     selectedCharacter = cmds.textScrollList(self.widgets["characterList"], q=True, si=True)[0]
     thumbnailPath = os.path.join(self.mayaToolsDir, "General", "Icons", "ART", "Thumbnails", project)
     try:
         thumbnails = os.listdir(thumbnailPath)
         for thumb in thumbnails:
             if thumb.find("_small") == -1:
                 if thumb.find(selectedCharacter) == 0:
                     cmds.image(self.widgets["thumbnail"], edit=True, image=os.path.join(thumbnailPath, thumb))
     except:
         cmds.confirmDialog(icon="critical", title="Error", message="No thumbnail found for character")
         return
开发者ID:Slugnifacent,项目名称:UnrealEngine,代码行数:13,代码来源:ART_addCharacter_UI.py


注:本文中的maya.cmds.image函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。