pymel.core.rendering.renderer¶
- renderer(*args, **kwargs)¶
Command to register renders. This command allows you to specify the UI name and procedure names for renderers. The command also allow you to query the UI name and the procedure names for the registered renders. In query mode, return type is based on queried flag.
Flags:
Long Name / Short Name Argument Types Properties addGlobalsNode / agn unicode This flag allows the user to add a globals node the specified renderer uses. addGlobalsTab / agt unicode, unicode, unicode Add a tab associated with the specified renderer for the unified render globals window. batchRenderOptionsProcedure / bro unicode Set or query the batch render options procedure associated with the specified renderer. batchRenderOptionsStringProcedure / bso unicode Set or query the argument string that will be used with the command line utility ‘Render’ when doing a batch render batchRenderProcedure / br unicode Set or query the batch render procedure associated with the specified renderer. cancelBatchRenderProcedure / cbr unicode Set or query returns the cancel batch render procedure associated with the specified renderer. changeIprRegionProcedure / cir unicode Set or query the change IPR region procedure associated with the specified renderer. commandRenderProcedure / cr unicode Set or query the command line rendering procedure associated with the specified renderer. exists / ex bool The flag returns true if the specified renderer is registered in the registry, and it returns false otherwise. globalsNodes / gn bool This flag returns the list of render globals nodes the specified renderer uses. globalsTabCreateProcNames / gtc bool This flag returns the names of procedures that are used to create the unified render globals window tabs that are associated with the specified renderer. globalsTabLabels / gtl bool This flag returns the labels of unified render globals window tabs that are associated with the specified renderer. globalsTabUpdateProcNames / gtu bool This flag returns the names of procedures that are used to update the unified render globals window tabs that are associated with the specified renderer. iprOptionsMenuLabel / ipm unicode Set or query the label for the IPR update options menu which is under the render view’s IPR menu. iprOptionsProcedure / io unicode Set or query the IPR render options procedure associated with the specified renderer. iprOptionsSubMenuProcedure / ips unicode Set or query the procedure for creating the sub menu for the IPR update options menu which is under the render view’s IPR menu. iprRenderProcedure / ipr unicode Set or query the IPR render command associated with the specified renderer. iprRenderSubMenuProcedure / irs unicode Set or query the procedure for creating the sub menu for the IPR render menu which is under the render view’s IPR menu. isRunningIprProcedure / isr unicode Set or query the isRunningIpr command associated with the specified renderer. logoCallbackProcedure / lgc unicode Set or query the procedure which is a callback associated to the logo for the specified renderer. For example, the logo and the callback can be used in the unified render globals window beside the Render UsingoptionMenu. logoImageName / log unicode Set or query the logo image name for the specified renderer. The logo is a image representing the renderer. materialViewRendererList / mvl bool Returns the names of material view renderers that are currently registered. materialViewRendererPause / mvp bool Specifies whether to pause the material viewer. Useful for globally halting updates to the material viewer. The material view renderer will remain suspended while the viewer is paused. materialViewRendererSuspend / mvs bool Specifies whether to suspend or resume the material view renderer. Useful for temporarily stopping the material view renderer while another rendering task is running. namesOfAvailableRenderers / ava bool Returns the names of renderers that are currently registered. pauseIprRenderProcedure / psi unicode Set or query the pause IPR render procedure associated with the specified renderer. polyPrelightProcedure / pp unicode Set or query the polygon prelight procedure associated with the specified renderer. refreshIprRenderProcedure / rfi unicode Set or query the refresh IPR render procedure associated with the specified renderer. renderDiagnosticsProcedure / rd unicode Set or query the render diagnostics procedure associated with the specified renderer. renderGlobalsProcedure / rg unicode This flag is obsolete. It will be removed in the next release. renderMenuProcedure / rm unicode This flag is obsolete. It will be removed in the next release. renderOptionsProcedure / ro unicode Set or query the render options procedure associated with the specified renderer. renderProcedure / r unicode Set or query the render command associated with the specified renderer. renderRegionProcedure / rr unicode Set or query the render region procedure associated with the specified renderer. renderSequenceProcedure / rs unicode rendererUIName / ui unicode Set or query the rendererUIName for the specified renderer. The rendererUIName is the name of the renderer as it would appear in menus. renderingEditorsSubMenuProcedure / res unicode Set or query the procedure reponsible for creating renderer specific editors submenu under the Rendering Editorsmenu for the specified renderer. showBatchRenderLogProcedure / brl unicode Set or query the log file batch procedure associated with the specified renderer. showBatchRenderProcedure / sbr unicode Set or query the show batch render procedure associated with the specified renderer. showRenderLogProcedure / srl unicode Set or query the log file render procedure associated with the specified renderer. startIprRenderProcedure / sti unicode Set or query the start IPR render procedure associated with the specified renderer. stopIprRenderProcedure / spi unicode Set or query the stop IPR render procedure associated with the specified renderer. textureBakingProcedure / tb unicode Set or query the texture baking procedure associated with the specified renderer. unregisterRenderer / unr bool Unregister the specified renderer. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.renderer
Example:
import pymel.core as pm # To register a renderer called "myRenderer": # pm.renderer( 'myRenderer' ) # To edit a renderer called "myRenderer" with its rendererUIName # being "My Renderer": # pm.renderer( 'myRenderer', edit=True, rendererUIName='My Renderer' ) # To register a renderer called "anotherRenderer" with all # its parameters specified. # pm.renderer( 'anotherRenderer', rendererUIName='Another Renderer', iprRenderProcedure='mayaSoftwareIprRender', -iprOptionsProcedure='', isRunningIprProcedure='mayaSoftwareIsRunningIpr', startIprRenderProcedure='mayaSoftwareStartIprRender', stopIprRenderProcedure='mayaSoftwareStopIprRender', refreshIprRenderProcedure='mayaSoftwareRefreshIprImage', pauseIprRenderProcedure='mayaSoftwarePauseIprRender', changeIprRegionProcedure='mayaSoftwareChangeIprRegion', iprOptionsMenuLabel='IPR Tuning Options', iprOptionsSubMenuProcedure='mayaSoftwareIprUpdateOptionsSubMenu', iprRenderSubMenuProcedure='mayaSoftwareIprUpdateRenderSubMenu', renderProcedure='mayaSoftwareRender', renderOptionsProcedure='RenderOptions', renderDiagnosticsProcedure='RenderDiagnostics', commandRenderProcedure='render -batch', batchRenderProcedure='BatchRender', batchRenderOptionsProcedure='BatchRenderOptions', batchRenderOptionsStringProcedure="mayaSoftwareBatchRenderOptionsString", cancelBatchRenderProcedure='CancelBatchRender', showBatchRenderProcedure='ShowBatchRender', showRenderLogProcedure='', showBatchRenderLogProcedure='', renderRegionProcedure='mayaRenderRegion', textureBakingProcedure='performConvertSolidTx', polyPrelightProcedure='performPrelight', renderingEditorsSubMenuProcedure='', logoImageName='', logoCallbackProcedure='' ) # To add a render globals node the renderer uses: # pm.renderer( 'anotherRenderer', edit=True, addGlobalsNode='defaultRenderGlobals' ) # To add the tabs associated with the specified renderer # for the unified render globals window, use the syntax # # renderer -edit # -addGlobalsTab globalsTabLabel # globalsTabCreateProcName # globalsTabUpdateProcName # renderer; # # where "globalsTabLabel" is the label of the tab, # "globalsTabCreatedProcName" is the name of the mel procedure # which is used to create the content in the tab. # and "globalsTabCreatedProcName" is the name of the mel procedure # which is used to update the content in the tab. # # Note that if you want to add a number of tabs, you need to repeat # this renderer command for each tab you wish to add, as shown below. # pm.renderer( 'anotherRenderer', edit=True, addGlobalsTab=('Maya Software', 'createMayaSoftwareGlobalsTab', 'updateMayaSoftwareGlobalsTab') ) # To get a list of unified render globals window tab labels associated # with the specified renderer. # pm.renderer( 'anotherRenderer', query=True, globalsTabLabels=True ) # To get a list of names of mel procedures which are used to # create the unified render globals window tabs associated with # the specified renderer. # pm.renderer( 'anotherRenderer', query=True, globalsTabCreateProcNames=True ) # To get a list of names of mel procedures which are used to # update the unified render globals window tabs associated with # the specified renderer. # pm.renderer( 'anotherRenderer', query=True, globalsTabUpdateProcNames=True ) # To view a list of registered renderers. # pm.renderer( query=True, namesOfAvailableRenderers=True ) # To check if anotherRenderer exists. # pm.renderer( 'anotherRenderer', exists=True ) # To view a list of render globals nodes used by the specified # renderer: # pm.renderer( 'anotherRenderer', query=True, globalsNodes=True )