<?xml version="1.0"?>
<!DOCTYPE renderer SYSTEM "renderer.dtd">
<!--
  Top level tag, mandatory:
   <renderer>: "desc" gives a one line description.

  Header tags, not mandatory, must be specified only once.
   <melheader>: "s" is a mel script executed just after the file is read 
   <meltrailer>: "s" is a mel script executed after all flags are converted
      to mel. Should contain at least the rendering command.

  Other tags:
   <sep>: "desc" produces a line in the help. Blank if desc is missing.
   <attr>: produces a setAttr line.
      "n" is the flag name.
      "s" the attribute name.
      "t" the parameter type, used in help description.
      "h" the help description.
   <attrString>: produces a setAttr line for a string attribute.
      Same paramters as <attr>, but for string attributes.
   <mel>: Calls a mel script.
      "n" is the flag name.
      "p" the number of parameters.
      "s" the string defining the action %1 ... %p are replaced with values
            read after the flag.
      "t" the parameter types, used in help description.
      "h" the help description.
-->
<renderer desc="Maya software renderer">
	<melheader s='string $opt = ""; string $rl=""; string $rp=""; float $resize=-1.; select defaultRenderGlobals; setAttr .renderAll 1'/>
	<meltrailer s='setMayaSoftwareLayers($rl, $rp); setImageSizePercent($resize); mayaBatchRenderProcedure(0, "", "", "mayaSoftware", $opt);'/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="General purpose flags:"/>
	<mel n="rd" p="1" s='workspace -rt "images" "%1";workspace -rt "depth" "%1";' t="path" h="Directory in which to store image files"/>
	<attrString n="im" s=".imageFilePrefix" t="filename" h="Image file output name"/>
	<mel n="fnc" s='setMayaSoftwareFrameExt("%1", 1)' p="1" t="int" h="File Name Convention: any of name, name.ext, ... See the\n\tRender Settings window to find available options. Use namec and\n\tnamec.ext for Multi Frame Concatenated formats. As a shortcut,\n\tnumbers 1, 2, ... can also be used"/>
	<mel n="of" s='setMayaSoftwareImageFormat("%1")' p="1" t="string" h="Output image file format. See the Render Settings window\n\tto find available formats"/>
	<sep/>
	<mel n="s" p="1" t="float" s="removeRenderLayerAdjustmentAndUnlock .animation; setAttr .animation 1; removeRenderLayerAdjustmentAndUnlock .startFrame; setAttr .startFrame %1" h="Starting frame for an animation sequence"/>
	<mel n="e" p="1" t="float" s="removeRenderLayerAdjustmentAndUnlock .animation; setAttr .animation 1; removeRenderLayerAdjustmentAndUnlock .endFrame; setAttr .endFrame %1" h="End frame for an animation sequence"/>
	<attr n="b" s=".byFrameStep" t="float" h="By frame (or step) for an animation sequence"/>
	<attr n="pad" s=".extensionPadding" t="int" h="Number of digits in the output image frame file name\n\textension"/>
	<mel n="rfs" p="1" t="int" s="removeRenderLayerAdjustmentAndUnlock .modifyExtension; setAttr .modifyExtension 1; removeRenderLayerAdjustmentAndUnlock .startExtension; setAttr .startExtension %1" h="Renumber Frame Start: number for the first image when\n\trenumbering frames"/>
	<attr n="rfb" s=".byExtension" t="int" h="Renumber Frame By: step used for renumbering frames"/>
	<mel n="se" p="1" t="int" s="removeRenderLayerAdjustmentAndUnlock .modifyExtension; setAttr .modifyExtension 1; removeRenderLayerAdjustmentAndUnlock .startExtension; setAttr .startExtension %1" h="Obsolete flag identical to -rfs. Used only for backward\n\tcompatibility"/>
	<attr n="be" s=".byExtension" t="int" h="Obsolete flag identical to -rfe. Used only for backward\n\tcompatibility"/>
	<sep/>
	<mel n="cam" s='makeCameraRenderable("%1")' p="1" t="name" h="Specify which camera to be rendered"/>
	<mel n="rgb" s='applyOnCameras("image", "%1")' p="1" t="boolean" h="Turn RGB output on or off"/>
	<mel n="alpha" s='applyOnCameras("mask", "%1")' p="1" t="boolean" h="Turn Alpha output on or off"/>
	<mel n="depth" s='applyOnCameras("depth", "%1")' p="1" t="boolean" h="Turn Depth output on or off"/>
	<mel n="iip" s="disableImagePlanes" p="0" t="" h="Ignore Image Planes turn off all image planes before\n\trendering"/>
	<sep/>
	<attr n="x" s="defaultResolution.width" t="int" h="Set X resolution of the final image"/>
	<attr n="y" s="defaultResolution.height" t="int" h="Set Y resolution of the final image"/>
	<mel n="percentRes" s="$resize=%1" p="1" t="float" h="Renders the image using percent of the resolution"/>
	<mel n="ard" p="1" t="float" s="removeRenderLayerAdjustmentAndUnlock defaultResolution.lockDeviceAspectRatio; setAttr defaultResolution.lockDeviceAspectRatio 1; removeRenderLayerAdjustmentAndUnlock defaultResolution.deviceAspectRatio; setAttr defaultResolution.deviceAspectRatio %1" h="Device aspect ratio for the rendered image"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="More advanced flags:"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Anti-aliasing quality:"/>
	<attr n="eaa" s="defaultRenderQuality.edgeAntiAliasing" t="int" h="The anti-aliasing quality of EAS (Abuffer). One of:\n\thighest(0), high(1), medium(2), low(3)"/>
	<!-- Number of samples options -->
	<attr n="ss" s="defaultRenderQuality.shadingSamples" t="int" h="Global number of shading samples per surface in a pixel"/>
	<attr n="mss" s="defaultRenderQuality.maxShadingSamples" t="int" h="Maximum number of adaptive shading samples per surface\n\tin a pixel"/>
	<attr n="mvs" s="defaultRenderQuality.visibilitySamples" t="int" h="Number of motion blur visibility samples"/>
	<attr n="mvm" s="defaultRenderQuality.maxVisibilitySamples" t="int" h="Maximum number of motion blur visibility samples"/>
	<attr n="pss" s="defaultRenderQuality.particleSamples" t="int" h="Number of particle visibility samples"/>
	<attr n="vs" s="defaultRenderQuality.volumeSamples" t="int" h="Global number of volume shading samples"/>
	<!-- Multi pixel filtering options -->
	<attr n="ufil" s="defaultRenderQuality.useMultiPixelFilter" t="boolean" h="If true, use the multi-pixel filtering; otherwise use\n\tsingle pixel filtering"/>
	<attr n="pft" s="defaultRenderQuality.pixelFilterType" t="int" h="When useFilter is true, identifies one of the following\n\tfilters: box(0), triangle(2), gaussian(4), quadratic(5)"/>
	<attr n="pfx" s="defaultRenderQuality.pixelFilterWidthX" t="float" h="When useFilter is true, defines the X size of the filter"/>
	<attr n="pfy" s="defaultRenderQuality.pixelFilterWidthY" t="float" h="When useFilter is true, defines the Y size of the filter"/>
	<!-- Contrast options -->
	<attr n="rct" s="defaultRenderQuality.redThreshold" t="float" h="Red channel contrast threshold"/>
	<attr n="gct" s="defaultRenderQuality.greenThreshold" t="float" h="Green channel contrast threshold"/>
	<attr n="bct" s="defaultRenderQuality.blueThreshold" t="float" h="Blue channel contrast threshold"/>
	<attr n="cct" s="defaultRenderQuality.coverageThreshold" t="float" h="Pixel coverage contrast threshold (default is 1.0/8.0)"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Raytracing quality:"/>
	<attr n="ert" s="defaultRenderQuality.enableRaytracing" t="boolean" h="Enable ray tracing"/>
	<attr n="rfl" s="defaultRenderQuality.reflections" t="int" h="Maximum ray-tracing reflection level"/>
	<attr n="rfr" s="defaultRenderQuality.refractions" t="int" h="Maximum ray-tracing refraction level"/>
	<attr n="sl" s="defaultRenderQuality.shadows" t="int" h="Maximum ray-tracing shadow ray depth"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Field Options:"/>
	<mel n="field" p="1" t="boolean" s="removeRenderLayerAdjustmentAndUnlock defaultResolution.fields; if (%1) setAttr defaultResolution.fields 3; else  setAttr defaultResolution.fields 0;" h="Enable field rendering. When on, images are interlaced"/>
	<mel n="pal" s="removeRenderLayerAdjustmentAndUnlock defaultResolution.oddFieldFirst; setAttr defaultResolution.oddFieldFirst 0" h="When field rendering is enabled, render even field\n\tfirst (PAL)"/>
	<mel n="ntsc" s="removeRenderLayerAdjustmentAndUnlock defaultResolution.oddFieldFirst; setAttr defaultResolution.oddFieldFirst 1" h="When field rendering is enabled, render odd field\n\tfirst (NTSC)"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Motion Blur:"/>
	<attr n="mb" s=".motionBlur" t="boolean" h="Motion blur on/off"/>
	<attr n="mbf" s=".motionBlurByFrame" t="float" h="Motion blur by frame"/>
	<mel n="sa" s='applyOnCameras("shutterAngle", "%1")' p="1" t="float" h="Shutter angle for motion blur (1-360)"/>
	<!-- motionBlurType is 0 for 2d, 1 for 3d, the bool needs to be inverted -->
	<mel n="mb2d" p="1" t="boolean" s="removeRenderLayerAdjustmentAndUnlock .motionBlurType; setAttr .motionBlurType (!%1); if (!%1) {removeRenderLayerAdjustmentAndUnlock .motionBlur; setAttr .motionBlur 1;}" h="Motion blur 2D on/off"/>
	<attr n="bll" s=".blurLength" t="float" h="2D motion blur blur length"/>
	<attr n="bls" s=".blurSharpness" t="float" h="2D motion blur blur sharpness"/>
	<attr n="smv" s=".smoothValue" t="int" h="2D motion blur smooth value"/>
	<attr n="smc" s=".smoothColor" t="boolean" h="2D motion blur smooth color on/off"/>
	<attr n="kmv" s=".keepMotionVector" t="boolean" h="Keep motion vector for 2D motion blur on/off"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Render Options:"/>
	<attr n="ifg" s=".ignoreFilmGate" t="boolean" h="Use the film gate for rendering if false"/>
	<attr n="edm" s=".enableDepthMaps" t="boolean" h="Enable depth map usage"/>
	<attr n="g" s=".gammaCorrection" t="float" h="Gamma value"/>
	<!-- Color compositing options -->
	<attr n="premul" s=".composite" t="boolean" h="Premultiply color by the alpha value"/>
	<attr n="premulthr" s=".compositeThreshold" t="float" h="When premultiply is on, defines the threshold used to\n\tdetermine whether to premultiply or not"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Memory and Performance:"/>
	<attr n="uf" s=".useFileCache" t="boolean" h="Use the tessellation file cache"/>
	<attr n="oi" s=".optimizeInstances" t="boolean" h="Dynamically detects similarly tessellated surfaces"/>
	<attr n="rut" s=".reuseTessellations" t="boolean" h="Reuse render geometry to generate depth maps"/>
	<attr n="udb" s=".useDisplacementBoundingBox" t="boolean" h="Use the displacement bounding box scale to optimize\n\tdisplacement-map performance"/>
	<attr n="mm" s=".maximumMemory" t="int" h="Renderer maximum memory use (in Megabytes)"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Render Layers and Passes:"/>
	<mel n="rl" s='$rl="%1"' p="1" t="boolean|name(s)" h="Render each render layer separately"/>
	<mel n="rp" s='$rp="%1"' p="1" t="boolean|name(s)" h="Render passes separately. 'all' will render all passes"/>
	<attr n="rs" s=".renderLayerSubdirs" t="boolean" h="Obsolete flag. Used only for backward compatibility"/>
	<mel n="sel" p="1" s="select -add %1; removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.renderAll; setAttr defaultRenderGlobals.renderAll 0" t="boolean|name(s)" h="Selects which objects, groups and/or sets to render"/>
	<mel n="l" p="1" s="selectLayerMembers %1; removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.renderAll; setAttr defaultRenderGlobals.renderAll 0" t="boolean|name(s)" h="Selects which display and render layers to render"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Mel callbacks"/>
	<attrString n="preRender" s=".preMel" t="string" h="Mel code executed before rendering"/>
	<attrString n="postRender" s=".postMel" t="string" h="Mel code executed after rendering"/>
	<attrString n="preLayer" s=".preRenderLayerMel" t="string" h="Mel code executed before each render layer"/>
	<attrString n="postLayer" s=".postRenderLayerMel" t="string" h="Mel code executed after each render layer"/>
	<attrString n="preFrame" s=".preRenderMel" t="string" h="Mel code executed before each frame"/>
	<attrString n="postFrame" s=".postRenderMel" t="string" h="Mel code executed after each frame"/>
	<mel n="pre" s='print("WARNING: flag -pre is obsolete. Use -preRender, -preLayer, -preFrame\n");' p="1" t="string" h="Obsolete flag"/>
	<mel n="post" s='print("WARNING: flag -post is obsolete. Use -postRender, -postLayer, -postFrame\n");' p="1" t="string" h="Obsolete flag"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Other:"/>
	<mel n="rep" s='$opt += " -rep %1";' p="1" t="boolean" h="Do not replace the rendered image if it already exists"/>
	<mel n="reg" s="setMayaSoftwareRegion(%1,%2,%3,%4)" t="int int int int" p="4" h="Set sub-region pixel boundary of the final image:\n\tleft, right, bottom, top"/>
	<attr n="n" s=".numCpusToUse" p="1" t="int" h="Number of processors to use (0 indicates use all\n\tavailable)"/>
	<mel n="mf" t="boolean" p="1" s="removeRenderLayerAdjustmentAndUnlock .outFormatControl; setAttr .outFormatControl (!%1);" h="Append image file format to image name if true"/>
	<attr n="sp" s=".shadowPass" p="1" t="boolean" h="Generate shadow depth maps only"/>
	<mel n="amt" s='$opt += " -amt %1";' p="1" t="boolean" h="Abort renderer when encountered missing texture"/>
	<attr n="ipr" s=".createIprFile" t="boolean" h="Create an IPR file"/>
	<mel n="keepPreImage" s='$opt += " -kpi %1";' p="1" t="boolean" h="Keep the renderings prior to post-process around"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="*** Remember to put a space between option flags and their arguments. ***"/>
	<sep desc="Any boolean flag will take the following values as TRUE: on, yes, true, or 1."/>
	<sep desc="Any boolean flag will take the following values as FALSE: off, no, false, or 0."/>
	<sep/>
	<sep desc="    e.g. -x 512 -y 512 -cam persp -im test -of jpg -mb on -sa 180 file"/>
</renderer>
