• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python cmds.image函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: previewCharacter

 def previewCharacter(self, x=None) :
     ''' TODO: Stub '''
     
     self.mocapTable.clearSelection()
     self.loadButton.setText("Load Template")
     return
     print "Preview Character: " + str(x)
     item = self.getSelectedCharacter()
     if item is None : return
     loadThumb = "%s/character/%s/thumb/%s" % (self.pathPrefix, item.group['title'], item.thumb)
     tempThumb = self.cache.cacheFile(loadThumb)
     m.image("peelMocap_image", e=True, i=tempThumb)
     m.image("peelMocap_image", e=True, vis=True)
开发者ID:mocap-ca,项目名称:cleanup,代码行数:13,代码来源:loader.py


示例17: createGUI

def createGUI(): 
    '''
    Creates a user interface for the city generator script.
    
    On exit: A window with the user interface has been created.
    '''    
    GUIwindow = cmds.window( title = "City Generator")
    layout0 = cmds.columnLayout()
    imageNum = random.randint(1,19)
    cmds.image("cityImage", image="cityImages/dayImage" + str(imageNum) + ".jpg", width = 800, height = 288 )
    layout1 = cmds.rowLayout(nc = 2, parent = layout0)
    layout2 = cmds.columnLayout(parent = layout1, rs = 3)
    cmds.rowLayout(nc = 2, parent = layout2, cw2 = [140,250])
    cmds.text(label = "City name")
    cmds.textField("cityName", width = 240)
    cmds.intSliderGrp("cityWidth", field=True, label="City width", minValue=50, maxValue=200, fieldMinValue=50, fieldMaxValue=200, value=100, cal = [1,"left"],parent = layout2)
    cmds.intSliderGrp("cityDepth", field=True, label="City depth", minValue=50, maxValue=200, fieldMinValue=50, fieldMaxValue=200, value=100, cal = [1,"left"],parent = layout2)
    cmds.intSliderGrp("minHeight", field=True, label="Minimum house height", minValue=4, maxValue=40, fieldMinValue=4, fieldMaxValue=40, value=4, cal = [1,"left"],parent = layout2, dc = changeMaxHeight)
    cmds.intSliderGrp("maxHeight", field=True, label="Maximum house height", minValue=4, maxValue=40, fieldMinValue=4, fieldMaxValue=40, value=30, cal = [1,"left"],parent = layout2, dc = changeMinHeight)
    cmds.intSliderGrp("minWidth", field=True, label="Minimum house width", minValue=2, maxValue=20, fieldMinValue=2, fieldMaxValue=20, value=5, cal = [1,"left"],parent = layout2, dc = changeMaxWidth)
    cmds.intSliderGrp("maxWidth", field=True, label="Maximum house width", minValue=12, maxValue=30, fieldMinValue=12, fieldMaxValue=30, value=20, cal = [1,"left"],parent = layout2, dc = changeMinWidth)
    cmds.checkBoxGrp("features", numberOfCheckBoxes=3, label1="Windows", label2 = "Booleans", label3="Deformers", v1=True, v2 = False, v3 = True, cc1 =  windows, cc2 = booleans, cal = [1,"left"],parent = layout2,cw = [1,140])
    cmds.checkBoxGrp("time", numberOfCheckBoxes=3, label1="Daytime", label2="Nighttime", label3 = "All windows glow", v1=True, v2 = False, v3 = False, enable3 = False, cal = [1,"left"], parent = layout2,cw = [1,140], cc1 = daytime, cc2 = nighttime )
    cmds.colorSliderGrp("environment", label="Environment colour", hsv=(204, 0.451, 1), parent = layout2, cal = [1,"left"] )
    layout3 = cmds.columnLayout(parent = layout1)
    cmds.text("Set the colour range for the houses by selecting the ranges separately for hue,\nsaturation and value.", align  = "left")
    cmds.text("\nStart of range:", align = "left")
    cmds.rowLayout( numberOfColumns=2, parent = layout3, cw2 = [70,200])
    cmds.canvas("hueCanvas1", hsvValue=(0, 1, 1), width=70, height=15)
    cmds.intSliderGrp("hue1", field=True, label="Hue", minValue=0, maxValue=360, fieldMinValue=0, fieldMaxValue=360, value=0,cw3 = [70,70,170], dc = hueChange1 )
    cmds.rowLayout( numberOfColumns=2, parent = layout3, cw2 = [70,200])
    cmds.canvas("saturationCanvas1", hsvValue=(0, 1, 1), width=70, height=15)
    cmds.floatSliderGrp("saturation1", field=True, label="Saturation", minValue=0, maxValue=1, fieldMinValue=0, fieldMaxValue=1, value=1,cw3 = [70,70,170], dc = saturationChange1, step = 0.01)
    cmds.rowLayout( numberOfColumns=2, parent = layout3, cw2 = [70,200])
    cmds.canvas("valueCanvas1", hsvValue=(0, 1, 1), width=70, height=15)
    cmds.floatSliderGrp("value1", field=True, label="Value", minValue=0, maxValue=1, fieldMinValue=0, fieldMaxValue=1, value=1,cw3 = [70,70,170], dc = valueChange1, step = 0.01)
    cmds.text("End of range:", align =  "left", parent = layout3)
    cmds.rowLayout( numberOfColumns=2, parent = layout3, cw2 = [70,200])
    cmds.canvas("hueCanvas2", hsvValue=(0, 1, 1), width=70, height=15)
    cmds.intSliderGrp("hue2", field=True, label="Hue", minValue=0, maxValue=360, fieldMinValue=0, fieldMaxValue=360, value=0,cw3 = [70,70,170], dc = hueChange2 )
    cmds.rowLayout( numberOfColumns=2, parent = layout3, cw2 = [70,200])
    cmds.canvas("saturationCanvas2", hsvValue=(0, 1, 1), width=70, height=15)
    cmds.floatSliderGrp("saturation2", field=True, label="Saturation", minValue=0, maxValue=1, fieldMinValue=0, fieldMaxValue=1, value=1,cw3 = [70,70,170], dc = saturationChange2, step = 0.01)
    cmds.rowLayout( numberOfColumns=2, parent = layout3, cw2 = [70,200])
    cmds.canvas("valueCanvas2", hsvValue=(0, 1, 1), width=70, height=15)
    cmds.floatSliderGrp("value2", field=True, label="Value", minValue=0, maxValue=1, fieldMinValue=0, fieldMaxValue=1, value=1,cw3 = [70,70,170], dc = valueChange2, step = 0.01)
    cmds.button(label = "Randomize", command = randomize, parent = layout3)
    layout4 = cmds.rowLayout(numberOfColumns=2, parent = layout0, cw2 = [690,110])
    cmds.button(label="Generate City", command = defaultButtonPush, parent = layout4, w = 685, h = 50)
    cmds.button(label="Clear Scene", command = clearScene, parent = layout4, w = 110, h = 50)
    cmds.showWindow()
开发者ID:hcbsundberg,项目名称:City_Generator,代码行数:51,代码来源:cityGui.py


示例18: UI

def UI():
        rlmAttrs()
        images=os.path.join(mc.workspace(q=1,rd=1),"images",mc.getAttr("renderLayerManager.shotName"))
        if (mc.window('rcFileManage',exists=True)): mc.deleteUI('rcFileManage')
        mc.window('rcFileManage', mxb=0,title=' ',tlb=False,)

        ###Main
        mc.columnLayout('renderLayers2Files')#,bgc=[0.2,0.2,0.2] 
        mc.image(image=iconPath+'toptitle.png')
        mc.cmdScrollFieldReporter(clr=1,hf=0,w=700,h=80,bgc=[0,0,0])
        print '//rc.Tools'
	mc.setParent('..')

	mc.rowColumnLayout(numberOfColumns=3,columnWidth=[(1,row1),(2,row2),(3,480)])
	
	mc.text(al='right',font=ui.titleFont,label='  Image Prefix: ')
	mc.menuBarLayout()
	mc.menu(label='Shot Name/')
	mc.menuItem(label='<RenderLayer>/<RenderLayer>',c=partial(runMethod,'set.imagePrefix','("S__L__L")'))
	mc.menuItem(label='<RenderLayer>/<RenderLayer>.<RenderPass>',c=partial(runMethod,'set.imagePrefix','("S__L__L.P")'))
	mc.menuItem(label='<RenderLayer>/<RenderPass>/<RenderLayer>.<RenderPass>',c=partial(runMethod,'set.imagePrefix','("S__L__P__L.P")'))
	mc.menu(label='...')
	mc.menuItem(label='<RenderLayer>/<RenderLayer>',c=partial(runMethod,'set.imagePrefix','("L__L")'))
	mc.menuItem(label='<RenderLayer>/<RenderLayer>.<RenderPass>',c=partial(runMethod,'set.imagePrefix','("L__L.P")'))
	mc.menuItem(label='<RenderLayer>/<RenderPass>/<RenderLayer>.<RenderPass>',c=partial(runMethod,'set.imagePrefix','("L__P__L.P")'))
	mc.setParent('..')
	mc.textField('imageFilePrefix',font=ui.fieldFont,en=1,text=mc.getAttr('defaultRenderGlobals.imageFilePrefix'))    
	
	mc.setParent('..')
	mc.setParent('..')

	###ListsUI
	mc.rowColumnLayout('listLayout',numberOfColumns=3,columnWidth=[(1,102),(2,browselistWidth), (3, targetlistWidth)])#LISTS LAYOUT

	mc.columnLayout()
	mc.separator(h=10,style='in')
	
	mc.rowColumnLayout(numberOfColumns=2)
	mc.text('UNITS:  ',align='right',fn='tinyBoldLabelFont')
	mc.text(str(mc.currentUnit(query=True)),align='left',fn='tinyBoldLabelFont')
	mc.text('FPS:  ',align='right',fn='tinyBoldLabelFont')
	mc.text(str(sceneData.fps()),align='left',fn='tinyBoldLabelFont')
	mc.text('RENDER:  ',align='left',fn='tinyBoldLabelFont')
	mc.text(str(mc.getAttr('defaultResolution.width'))+'x'+str(mc.getAttr('defaultResolution.height')),align='left',fn='tinyBoldLabelFont')
	mc.setParent('..')
	mc.setParent('listLayout')
	bldBrowseList()
	mc.setParent('listLayout')
	bldTargetList('browser')
	mc.setParent('listLayout')
	mc.showWindow()	
开发者ID:RobRuckus,项目名称:rcTools,代码行数:51,代码来源:rcFileManager.py


示例19: __init__

	def __init__(self):
		# Settings:
		bgColor = [0.5, 0.5, 0.5]
		headerPath = "//bigfoot/kroetenlied/060_Software/Kroetenlied_Pipeline/vuMayaPlugins/scripts/saveIncr.jpg"


		# Collect Variables
		fullName = cmds.file(sceneName=True, q=True)
		paths = fullName.split("/")
		assetCode = paths[-2].split("_")[1]

		self.rootFolder = "/".join(paths[:-1])
		self.taskName = paths[-2].split("_")[2]
		self.assetName = Assets.getFullName(assetCode)
		self.artist = getpass.getuser()[:2]
		self.version = "v" + ("000" + str(VersionControl.getLatest(self.rootFolder, up=1, getNum=True)))[-3:]

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

		# Header
		cmds.columnLayout(parent=self.window)
		cmds.image(image = headerPath)
		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=50, 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=50, tx=self.artist)
		self.textComment = cmds.textField(w=200)
		cmds.textField(ed=False, w=25, tx=".ma")

		# 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()
开发者ID:Loqy,项目名称:Kroetenlied_Pipeline,代码行数:51,代码来源:mayaCommands.py


示例20: fillModuleList

 def fillModuleList( self, *args ):
     from marigold.utility.NodeUtility import getMetaNodesInScene
     from marigold.utility.FrameUtility import getFrameBitSettings
     
     # Clean up UI elements for refreshing the list.
     lChildren = cmds.scrollLayout( self.moduleList, query=True, childArray=True )
     if lChildren is not None:
         for c in lChildren:
             cmds.deleteUI( c )
             #self.aRows = []
     
     # Build module list for ui.
     moduleList = getMetaNodesInScene( 'frameModule' )
     print moduleList
     
     previousColor = 2
     warningPip = False
     for i, module in enumerate( moduleList ):
         print i, module
         
         # Get the required plug data.
         moduleData = {}
         nodeAttrs = getFrameBitSettings( module )    
         moduleData['priority'] = nodeAttrs['buildPriority']
         moduleData['frameName'] = module
         moduleData['modFolder'] = nodeAttrs['buildFolder']
         moduleData['modFile'] = nodeAttrs['metaClass']
         
         # Set the row color.
         color = 1
         if previousColor is 1:
             color = 2
             previousColor = 2
         else:
             color = 1
             previousColor = 1
             
         # Make the row.
         self.modListColumn = cmds.rowColumnLayout( parent=self.moduleList, numberOfColumns=6,
                                                    columnWidth=[(1,26),(2,30),(3,90),(4,50),(5,50),(6,20)],
                                                    columnSpacing=[(1,2),(2,2),(3,2),(4,2),(5,2),(6,2)],
                                                    backgroundColor=self.rowColors[color-1] )
         cmds.intField( editable=False, value=moduleData['priority'] )
         cmds.image( image='icon_warning_pip.png', visible=warningPip )
         cmds.text( label=moduleData['frameName'] )
         cmds.button( label='options' )
         cmds.button( label='build', command=lambda v, a1=moduleData['modFolder'], a2=moduleData['modFile']: buttonBuildTemp( v, a1, a2 ) )
         cmds.checkBox( label='' )            
         cmds.setParent( '..' )#self.modListColumn
开发者ID:EriLee,项目名称:mar

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python cmds.intField函数代码示例发布时间:2022-05-27
下一篇:
Python cmds.ikHandle函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap