pymel.core.rendering.Mayatomr

static rendering.Mayatomr(*args, **kwargs)

This mel command provides access to most functionalities of mental ray for maya plugin including .mi file export, preview and batch rendering, network rendering and shader management.

Flags:
Long name (short name) Argument Types Properties
active (a) bool  
 

Translate active scene elements only to create the final scene. This includes just selected geometry, together with all shading nodes that these objects reference, all lights and render camera(s). This ensures that always a renderable scene is generated. This mode can be combined with the export filter. Default: translate whole scene

addHosts (ah) unicode  
 

Add the given machine name to the host list. (Attach the given host.) Must be used after mental ray is properly initialized; after an image is rendered for example. For internal use only.

addIncludes (ai) unicode  
 

Include the specified .mi file interactively. Must be used after mental ray is properly initialized; after an image is rendered for example. For internal use only.

addLinks (al) unicode  
 

Links the specified shader library interactively. Must be used after mental ray is properly initialized; after an image is rendered for example. For internal use only.

assembly (assembly) bool  
   
assemblyRootName (asn) unicode  
   
binary (bin) bool  
 
Export binary .mi format (write binary vectors in object definitions). Default: off, write ascii format
camera (cam) unicode  
 
Use this camera as the render camera for preview rendering. Camera shape name is expected. Default: render globals camera
cancel (cc) bool  
   
compression (cp) int  
   
directory (dir) unicode  
   
displayTessellation (dt) bool  
   
echo (e) bool  
 
Export scene to .mi file by sending scene data to builtin mental ray and executing its echo command. Default: off
exportFilter (xf) int  
 

This allows to remove certain types of mental ray entities from exported .mi files. The integer argument is a bit set where each bit represents a single filter entry. This is the complete list:valueposvalueFilterLink01FilterInclude12FilterVersion24FilterTextures38FilterObject416FilterGroup532FilterLight664FilterCamera712 8FilterMaterial8256FilterOptions9512FilterFunction101024FilterFuncDecl112048FilterPhenDecl124096FilterUserData138192FilterInstObject1416384FilterInstGroup1532768F ilterInstLight1665536FilterInstCamera17131072FilterInstFunction18262144FilterRender19524288FilterCustomText201048576FilterCustomShader212097152FilterCustomPhen224 194304The integer values in this list determine the bit position in the pattern. MEL has no bit shift operation, but instead the command: pow 2 poscan be used to compute the final integer value. Any combination of filter entries is supported, the final filter integer is the sum of the individual values. Example: to not write (cut out) ‘link’ and ‘include’ statements you would give Mayatomr -mi -file fileName -exportFilter 3 A convenient MEL function miExportFilterValue(string $entries[]) is available which calculates the final integer argument based on supplied descriptive type names, like link, include, and so on. The list of supported type names can be found in the file mentalrayUI.mel. Default: no filter

exportFilterString (xfs) unicode  
 
Set the export filter using a string argument where every character in the string marks the corresponding bit position in the above pattern. Default: no filter
exportPathNames (xp) unicode  
 

Export option for the file references such as : link library, include mi file, texture file, lightmap, etc. All file references can be forced to be the same with valuesabs-absolute rel-relative non-nopathAlternatively, the string can specify each individual file reference, with each character in the string representing a single file reference entry, with meaning 0-nochange 1-absolute 2-relative 3-nopath, or 0-nochange a-absolute r-relative n-nopath. The file reference entry is specified in this order : link library, include mi file, texture file, lightmap, light profile, output image, shadow map, finalgather map, photon map, demand load object mi file. Default: nochangeFor example, -xp aarrararrawill use absolute path for link libray, include file, light profile, shadow map, demand load object mi file, and relative path for texture file, lightmap, output image, finalgather map, photon map If the individual file reference string is not fully specified, the last character will be assumed for all remaining file references. So, for example, -xp aarrais equivalent to -xp aarraaaaaaFlag can have multiple arguments, passed either as a tuple or a list.

exportStartFile (xsf) bool  
 

Include the currently used startup file maya.rayrc into the exported .mi file. Startup file statements need not be given again from within the scene file (via custom text) in this case Default: off

file (f) unicode  
 
Set the file name and path for .mi export or .mi echo. Default: untitled
fragmentChildDag (fcd) bool  
 

In fragment mode, additionally translate any child DAG graph of transform nodes found in the current selection. Default: translate just the selected object/instance

fragmentExport (fe) bool  
 

Enable fragment .mi file export. This just translates the selected nodes of any supported type. Further options allow to extend the translation to consider related or connected nodes as well, see below. This mode allows to create .mi files that only contain the intended piece of information, which usually results in non-renderable .mi files. Note, for a geometric object, the export will always contain both the object and its instance, regardless if just the shape node or its parent transform is selected. Default: translate whole scene

fragmentIncomingShdrs (fis) bool  
 
In fragment mode, additionally translate shading nodes which are connected to nodes found in the current selection (driving nodes). Default: ignore connections
fragmentMaterialAssignments (fma) bool  
   
fragmentMaterials (fem) bool  
 
In fragment mode, additionally translate attached materials for shape/transform nodes found in the current selection. Default: ignore attached materials
help (h) bool  
   
imageFormat (imageFormat) int  
   
imageType (it) int  
   
immediateModeRender (imr) bool  
 

Interactive rendering only. Begins/stops mental ray immediate mode render (IPR). Can be followed by pt/pauseTuning, rg/region, rr/regionRect. If comes with query flag q/query, returns true if mental ray IPR is running, false otherwise. Only a subset of options will be accepted if mental ray IPR is turned on.

init (ini) bool  
 

Perform the initialization steps again for the integrated renderer, including loading startup files and redoing custom link and include commands. For internal use only. Rendering flags

layer (l) unicode  
 

Render the specified render layer. Only this render layer will be rendered, regardless of the renderable attribute value of the render layer. The layer name will be appended to the output image file name. The specified render layer becomes the current render layer before rendering, and remains as current render layer after the rendering. Network Rendering flags, used with other rendering flags

license (lic) unicode  
 
Obsolete flag. mental ray IPR flags
lightMap (lm) bool  
   
listDB (ldb) bool  
   
listHosts (lh) bool  
 
List machine names in the host list. Must be used after mental ray is properly initialized; after an image is rendered for example. For internal use only.
listLinks (ll) bool  
 
List shader libraries currently linked. Must be used after mental ray is properly initialized; after an image is rendered for example. For internal use only.
logFile (log) bool  
 

Write mental ray render messages to a file called ‘mentalray.log’ located in the current directory. Additionally, these messages are still written to the output or parent shell window.

miStream (mi) bool  
 
Export scene to .mi file. Default: off
node (n) unicode  
   
outputDir (out) unicode  
   
padframe (pad) int  
 
Set frame number padding (fixed field width) used to generate file name extensions during per-frame .mi file export of animations. Default: 0, no padding
passContributionMaps (pcm) bool  
   
passUserData (pud) bool  
   
pauseTuning (pt) bool  
 

Used with imr/immediateModeRender. Pause/resume mental ray IPR. If paused, attribute changes still update the internal database. Export flags

perframe (pf) int  
 

Controls per-frame .mi file export of animations. Supported values are: 0 (single .mi file containing the whole animation, exploiting incremental changes), values greater 0 export one .mi file per frame not using incremental changes, with different naming scheme: 1 (name.ext.#), 2 (name.#.ext), 3 (name.#). Default: 0

phmapDir (phm) unicode  
   
preview (pv) bool  
 
Perform preview rendering with integrated mental ray. Only for interactive rendering. (Not for batch rendering) Cannot be specified with r/render. Default: off
previousView (prv) bool  
 

Use render camera from a previous run for preview rendering, if no explicit camera has been given on the same command line. Default: first renderable camera found in the scene

project (prj) unicode  
 

Set the project root directory to be used by the plug-in. Affects the default output directory as well as handling of file references in project subdirectories not addressed with full file path, like textures. Default: none for file export, default project directory for preview

region (rg) bool  
 
Preview render only the current region rectangle of the Maya render window. Default: render whole image
regionRect (rr) int, int, int, int  
 

If region is enabled this sets a custom rectangular region for preview rendering. The four integer values specify the left, bottom, right, and top bounds, in this order. Default: render window region

removeHosts (rh) unicode  
 

Remove the given machine name from the host list. (Detach the given host.) Must be used after mental ray is properly initialized; after an image is rendered for example. For internal use only.

removeLinks (rl) unicode  
 

Unlink the specified shader library interactively. Must be used after mental ray is properly initialized; after an image is rendered for example. For internal use only.

render (r) bool  
 
Performs rendering in batch mode with integrated mental ray. Only for batch rendering. (Not for interactive rendering) Cannot be specified with pv/preview.
renderNoMaster (rnm) bool  
 
If given it allows to render almost everything on slave machines, thus reducing the workload on the master machine (where Maya is running).
renderNoSlaves (rns) bool  
 
If given it allows to render almost everything on the master machine (where Maya is running), thus reducing the workload on the slave machines.
renderTarget (rtg) unicode  
   
renderThreads (rt) int  
 
It allows to reduce the number of render threads used in mental ray for the current rendering. Accepts values from 1 to 4. Default: 4
renderVerbosity (rv) int  
 

Set the mental ray message verbosity level. The value can range from 0 to 6, setting the verbosity to none, fatal, error, warning, info, progress, and details, respectively. Default: render globals settings (warning level)

shmapDir (shm) unicode  
   
source (s) unicode  
   
tabstop (tab) int  
 
Set the number of space characters used to indent lines in the .mi files. Default: 4
textureDir (tex) unicode  
   
updateHosts (uh) bool  
 

Reload the maya.rayhosts file and update the list of host machines (slave machines) accordingly. Must be used after mental ray is properly initialized; after an image is rendered for example. For internal use only.

updateRayrc (ur) bool  
 
Reload maya.rayrc file to reinitialize mental ray. For internal use only.
useLensBake (ulb) bool  
   
verbosity (v) int  
 

Set the plug-in message verbosity level. The value can range from 0 to 6, setting the verbosity to none, fatal, error, warning, info, progress, and details, respectively. Default: render globals settings (warning level)

vertexMode (vm) bool  
   
xResolution (x) int  
 
Set the output image x resolution for preview rendering. Default: render globals image width
yResolution (y) int  
 
Set the output image y resolution for preview rendering. Default: render globals image height

Derived from mel command maya.cmds.Mayatomr

Previous topic

pymel.core.rendering.viewSet

Next topic

pymel.core.rendering.ambientLight

Core

Core Modules

Other Modules

This Page