Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

renderWindowEditor( editorName , [autoResize=boolean], [blendMode=int], [caption=string], [changeCommand=[string, string, string, string]], [clear=[int, int, float, float, float]], [cmEnabled=boolean], [colorManage=boolean], [compDisplay=int], [compImageFile=string], [control=boolean], [currentCamera=string], [currentCameraRig=string], [defineTemplate=string], [displayImage=int], [displayImageViewCount=int], [displayStyle=string], [docTag=string], [doubleBuffer=boolean], [drawAxis=boolean], [editorName=boolean], [exists=boolean], [exposure=float], [filter=string], [forceMainConnection=string], [frameImage=boolean], [frameRegion=boolean], [gamma=float], [highlightConnection=string], [loadImage=string], [lockMainConnection=boolean], [mainListConnection=string], [marquee=[float, float, float, float]], [nbImages=boolean], [nextViewImage=boolean], [outputColorManage=boolean], [panel=string], [parent=string], [pcaption=string], [realSize=boolean], [refresh=boolean], [removeAllImages=boolean], [removeImage=boolean], [resetRegion=boolean], [resetViewImage=boolean], [saveImage=boolean], [scaleBlue=float], [scaleGreen=float], [scaleRed=float], [selectionConnection=string], [showRegion=[int, int]], [singleBuffer=boolean], [snapshot=[string, int, int]], [snapshotMode=boolean], [stateString=boolean], [stereo=int], [stereoImageOrientation=[string, string]], [stereoMode=string], [toggle=boolean], [unParent=boolean], [unlockMainConnection=boolean], [updateMainConnection=boolean], [useTemplate=string], [viewImageCount=int], [viewTransformName=string], [writeImage=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

renderWindowEditor is undoable, queryable, and editable.

Create a editor window that can receive the result of the rendering process

Return value

stringThe name of the editor

In query mode, return type is based on queried flag.

Flags

autoResize, blendMode, caption, changeCommand, clear, cmEnabled, colorManage, compDisplay, compImageFile, control, currentCamera, currentCameraRig, defineTemplate, displayImage, displayImageViewCount, displayStyle, docTag, doubleBuffer, drawAxis, editorName, exists, exposure, filter, forceMainConnection, frameImage, frameRegion, gamma, highlightConnection, loadImage, lockMainConnection, mainListConnection, marquee, nbImages, nextViewImage, outputColorManage, panel, parent, pcaption, realSize, refresh, removeAllImages, removeImage, resetRegion, resetViewImage, saveImage, scaleBlue, scaleGreen, scaleRed, selectionConnection, showRegion, singleBuffer, snapshot, snapshotMode, stateString, stereo, stereoImageOrientation, stereoMode, toggle, unParent, unlockMainConnection, updateMainConnection, useTemplate, viewImageCount, viewTransformName, writeImage
Long name (short name) Argument types Properties
autoResize(ar) boolean createqueryedit
Lets the render view editor automatically resize the viewport or not.
blendMode(blm) int createqueryedit
Sets the blend mode for the render view. New image sent to the render view will be blended with the previous image in the render view, and the composited image will appear.
caption(cap) string createqueryedit
Sets the caption which appears at the bottom of the render view.
changeCommand(cc) [string, string, string, string] createqueryedit
Parameters:
  • First string: command
  • Second string: editorName
  • Third string: editorCmd
  • Fourth string: updateFunc
Call the command when something changes in the editor The command should have this prototype :
command(string $editor, string $editorCmd, string $updateFunc, int $reason)
The possible reasons could be :
  • 0: no particular reason
  • 1: scale color
  • 2: buffer (single/double)
  • 3: axis
  • 4: image displayed
  • 5: image saved in memory
clear(cl) [int, int, float, float, float] createqueryedit
Clear the image with the given color at the given resolution. Argumnets are respecively: width height red green blue.
cmEnabled(cme) boolean queryedit
Turn on or off applying color management in the View. If set, the color management configuration set in the current view is used.
colorManage(com) boolean edit
When used with the writeImage flag, causes the written image to be color-managed using the settings from the view color manager attached to the view.
compDisplay(cd) int createqueryedit
  • 0 : disable compositing.
  • 1 : displays the composited image immediately.
    For example, when foreground layer tile is sent to the render view window, the composited tile is displayed in the render view window, and the original foreground layer tile is not displayed.
  • 2 : display the un-composited image, and keep the composited image for the future command.
    For example, when foreground layer tile is sent to the render view window, the original foreground layer tile is not displayed, and the composited tile is stored in a buffer.
  • 3 : show the current composited image. If there is a composited image in the buffer, display it.
compImageFile(cif) string createqueryedit
Open the given image file and blend with the buffer as if the image was just rendered.
control(ctl) boolean query
Query only. Returns the top level control for this editor. Usually used for getting a parent to attach popup menus. Caution: It is possible for an editor to exist without a control. The query will return "NONE" if no control is present.
currentCamera(crc) string createqueryedit
Get or set the current camera. (used when redoing last render)
currentCameraRig(crg) string createqueryedit
Get or set the current camera rig name. If a camera rig is specified, it will be used when redoing the last render as opposed to the currentCamera value, as the currentCamera value will hold the child camera last used for rendering the camera rig.
defineTemplate(dt) string create
Puts the command in a mode where any other flags and arguments are parsed and added to the command template specified in the argument. They will be used as default arguments in any subsequent invocations of the command when templateName is set as the current template.
displayImage(di) int queryedit
Set a particular image in the Editor Image Stack as the current Editor Image. Images are added to the Editor Image Stack using the "si/saveImage" flag.
displayImageViewCount(dvc) int query
Query the number of views stored for a given image in the Editor Image Stack. This is not the same as querying using "viewImageCount" which returns the number of views for the current rendered image.
displayStyle(dst) string createqueryedit
Set the mode to display the image. Valid values are:
  • "color" to display the basic RGB image
  • "mask" to display the mask channel
  • "lum" to display the luminance of the image
docTag(dtg) string createqueryedit
Attaches a tag to the editor.
doubleBuffer(dbf) boolean createqueryedit
Set the display in double buffer mode
drawAxis(da) boolean createqueryedit
Set or query whether the axis will be drawn.
editorName(en) boolean query
Returns the name of the editor, or an empty string if the editor has not been created yet.
exists(ex) boolean create
Returns whether the specified object exists or not. Other flags are ignored.
exposure(exp) float queryedit
The exposure value used by the color management of the current view.
filter(f) string createqueryedit
Specifies the name of an itemFilter object to be used with this editor. This filters the information coming onto the main list of the editor.
forceMainConnection(fmc) string createqueryedit
Specifies the name of a selectionConnection object that the editor will use as its source of content. The editor will only display items contained in the selectionConnection object. This is a variant of the -mainListConnection flag in that it will force a change even when the connection is locked. This flag is used to reduce the overhead when using the -unlockMainConnection , -mainListConnection, -lockMainConnection flags in immediate succession.
frameImage(fi) boolean createqueryedit
Frames the image inside the window.
frameRegion(fr) boolean createqueryedit
Frames the region inside the window.
gamma(ga) float queryedit
The gamma value used by the color management of the current view.
highlightConnection(hlc) string createqueryedit
Specifies the name of a selectionConnection object that the editor will synchronize with its highlight list. Not all editors have a highlight list. For those that do, it is a secondary selection list.
loadImage(li) string edit
load an image from disk and set it as the current Editor Image
lockMainConnection(lck) boolean createedit
Locks the current list of objects within the mainConnection, so that only those objects are displayed within the editor. Further changes to the original mainConnection are ignored.
mainListConnection(mlc) string createqueryedit
Specifies the name of a selectionConnection object that the editor will use as its source of content. The editor will only display items contained in the selectionConnection object.
marquee(mq) [float, float, float, float] createqueryedit
The arguments define the four corners of a rectangle: top left bottom right. The rectangle defines a marquee for the render computation.
nbImages(nim) boolean query
returns the number of images
nextViewImage(nvi) boolean createedit
The render editor has the capability to render multiple cameras within a single view. This is different from image binning where an image is saved. Multiple image views are useful for comparing two different camera renders side-by-side. The nextViewImage flag tells the editor that it should prepare its internal image storage mechanism to store to the next view location.
outputColorManage(ocm) boolean edit
When used with the writeImage flag, causes the written image to be color-managed using the outpute color space in the color preferences attached to the view.
panel(pnl) string createquery
Specifies the panel for this editor. By default if an editor is created in the create callback of a scripted panel it will belong to that panel. If an editor does not belong to a panel it will be deleted when the window that it is in is deleted.
parent(p) string createqueryedit
Specifies the parent layout for this editor. This flag will only have an effect if the editor is currently un-parented.
pcaption(pca) string createqueryedit
Get or set the permanent caption which appears under the image that is currently showing in the render editor.
realSize(rs) boolean createqueryedit
Display the image with a one to one pixel match.
refresh(ref) boolean edit
requests a refresh of the current Editor Image.
removeAllImages(ra) boolean edit
remove all the Editor Images from the Editor Image Stack
removeImage(ri) boolean edit
remove the current Editor Image from the Editor Image Stack
resetRegion(rr) boolean createqueryedit
Forces a reset of any marquee/region.
resetViewImage(rvi) boolean createedit
The render editor has the capability to render multiple cameras within a single view. This is different from image binning where an image is saved. Multiple image views are useful for comparing two different camera renders side-by-side. The resetViewImage flag tells the editor that it should reset its internal image storage mechanism to the first image. This would happen at the very start of a render view render.
saveImage(si) boolean edit
save the current Editor Image to memory. Saved Editor Images are stored in an Editor Image Stack. The most recently saved image is stored in position 0, the second most recently saved image in position 1, and so on... To set the current Editor Image to a previously saved image use the "di/displayImage" flag.
scaleBlue(sb) float createqueryedit
Define the scaling factor for the blue component in the View. The default value is 1 and can be between -1000 to +1000
scaleGreen(sg) float createqueryedit
Define the scaling factor for the green component in the View. The default value is 1 and can be between -1000 to +1000
scaleRed(sr) float createqueryedit
Define the scaling factor for the red component in the View. The default value is 1 and can be between -1000 to +1000
selectionConnection(slc) string createqueryedit
Specifies the name of a selectionConnection object that the editor will synchronize with its own selection list. As the user selects things in this editor, they will be selected in the selectionConnection object. If the object undergoes changes, the editor updates to show the changes.
showRegion(srg) [int, int] createqueryedit
Shows the current region at the given resolution. The two parameters define the width and height.
singleBuffer(sbf) boolean createqueryedit
Set the display in single buffer mode
snapshot(snp) [string, int, int] createqueryedit
Makes a copy of the camera of the model editor at the given size. First argument is the editor name, second is the width, third is the height.
snapshotMode(snm) boolean createqueryedit
Get or set the window's snapshot mode.
stateString(sts) boolean query
Query only flag. Returns the MEL command that will create an editor to match the current editor state. The returned command string uses the string variable $editorName in place of a specific name.
stereo(s) int createqueryedit
Puts the editor into stereo image mode. The effective resolution of the output image is twice the size of the horizontal size. The orientation of the images can be set using the stereoOrientation flag.
stereoImageOrientation(sio) [string, string] createqueryedit
Specifies the orientation of stereo camera renders. The first argument specifies the orientation value for the firstleft image and the second argument specifies the orientation value for the right image. The orientation values are 'normal', the image appears as seen throught he camera, or 'mirrored', the image is mirrored horizontally.
stereoMode(sm) string createqueryedit
Specifies how the image is displayed in the view. By default the stereo is rendered with a side by side image. The rendered image is a single image that is twice the size of a normal image, 'both'. Users can also choose to display as 'redcyan', 'redcyanlum', 'leftonly', 'rightonly', or 'stereo'. both - displays both the left and right redcyan - displays the images as a red/cyan pair. redcyanlum - displays the luminance of the images as a red/cyan pair. leftonly - displays the left side only rightonly - displays the right side only stereo - mode that supports Crystal Eyes(tm) or Zscreen (tm) renders
toggle(tgl) boolean createqueryedit
Turns the ground plane display on/off.
unParent(up) boolean createedit
Specifies that the editor should be removed from its layout. This cannot be used in query mode.
unlockMainConnection(ulk) boolean createedit
Unlocks the mainConnection, effectively restoring the original mainConnection (if it is still available), and dynamic updates.
updateMainConnection(upd) boolean createedit
Causes a locked mainConnection to be updated from the orginal mainConnection, but preserves the lock state.
useTemplate(ut) string create
Forces the command to use a command template other than the current one.
viewImageCount(vic) int createqueryedit
The render editor has the capability to render multiple cameras within a single view. This is different from image binning where an image is saved. Multiple image views are useful for comparing two different camera renders side-by-side. The viewImageCount flag tells the editor that it should prepare its internal image storage mechanism for a given number of views.
viewTransformName(vtn) string queryedit
Sets/gets the view transform to be applied if color management is enabled in the current view.
writeImage(wi) string edit
write the current Editor Image to disk

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

import maya.cmds as cmds

# There can only be one renderWindowEditor.
# Check if it already exists or create it otherwise.
#
editor = cmds.renderWindowEditor(q=True, editorName=True )
if( len(editor) == 0  ):
	editor = cmds.renderWindowEditor( "renderView" )

cmds.renderWindowEditor( editor, e=True, mq=(0.7, 0.3, 0.3, 0.5) )

cmds.renderWindowEditor( editor, e=True, ar=True )

cmds.renderWindowEditor( editor, e=True, snapshot=('persp', 256, 256) )

cmds.renderWindowEditor( editor, e=True, crc='persp' )
cmds.renderWindowEditor( editor, q=True, crc=True )