<?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 parameters 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="TURTLE frame renderer">
	<melheader s='string $extraOptions=""; string $rl=""; string $rp=""; float $resize=-1.; ilrLoadTurtle; setAttr TurtleRenderOptions.renderer 0'/>
	<meltrailer s='ilrSetRenderLayersAndPasses($rl, $rp); setImageSizePercent($resize); mayaBatchRenderProcedure(0, "", "", "turtle", $extraOptions); '/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="*** General purpose flags ***"/>
	<!-- ______________________________________________________________ -->
	<sep/>
	<sep desc="Frame naming/numbering options:"/>
	<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="defaultRenderGlobals.imageFilePrefix" t="filename" h="Image file output name"/>
	<mel n="of" p="1" s='ilrSetImageFormat("%1")' t="string" h="Output image file format (tga, ppm, exr, tif8, tif16, tif32, iff, exrml, bmp or png)"/>
	<mel n="s" p="1" s="removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.animation; setAttr defaultRenderGlobals.animation 1; removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.startFrame; setAttr defaultRenderGlobals.startFrame %1" t="float" h="Starting frame for an animation sequence"/>
	<mel n="e" p="1" s="removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.animation; setAttr defaultRenderGlobals.animation 1; removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.endFrame; setAttr defaultRenderGlobals.endFrame %1" t="float" h="End frame for an animation sequence"/>
	<attr n="b" s="defaultRenderGlobals.byFrameStep" t="float" h="By frame (or step) for an animation sequence"/>
	<attr n="pad" s="defaultRenderGlobals.extensionPadding" t="int" h="Number of digits in the output image frame file name\n\t\t\textension"/>
	<mel n="rfs" p="1" s="removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.modifyExtension; setAttr defaultRenderGlobals.modifyExtension 1; removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.startExtension; setAttr defaultRenderGlobals.startExtension %1" t="int" h="Renumber Frame Start: number for the first image when \n\t\t\trenumbering frames"/>
	<attr n="rfb" s="defaultRenderGlobals.byExtension" t="int" h="Renumber Frame By (or step) used for renumbering frames"/>
	<mel n="fnc" p="1" s='setMayaSoftwareFrameExt("%1", 1)' t="int" h="File Name Convention: any of name, name.ext, ... \n\t\t\tSee the Render Settings window to find available \n\t\t\toptions. Use namec and namec.ext for Multi Frame \n\t\t\tConcatenated formats. As a shortcut, numbers 1, 2, ... \n\t\t\tcan also be used"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Camera options:"/>
	<mel n="cam" p="1" s='makeCameraRenderable("%1")' t="name" h="Specify which camera to be rendered"/>
	<mel n="rgb" p="1" s='applyOnCameras("image", "%1")' t="boolean" h="Turn RGB output on or off"/>
	<mel n="alpha" p="1" s='applyOnCameras("mask", "%1")' t="boolean" h="Turn Alpha output on or off"/>
	<mel n="depth" p="1" s='applyOnCameras("depth", "%1")' t="boolean" h="Turn Depth output on or off"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Resolution options:"/>
	<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="region" p="4" s='$extraOptions += "-region %1 %2 %3 %4"' t="int int int int" h="Renders a region of the image. The following syntax should be used; -region left bottom right top"/>
	<mel n="percentRes" p="1" s="$resize=%1" t="float" h="Renders the image using percent of the resolution"/>
	<attr n="ard" s="defaultResolution.deviceAspectRatio" t="float" h="Device aspect ratio for the rendered image"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Render Layers and Passes:"/>
	<mel n="rl" p="1" s='$rl="%1"' t="boolean|name(s)" h="Render each render layer separately"/>
	<mel n="rp" p="1" s='$rp="%1"' t="boolean|name(s)" h="Render passes separately. 'all' will render all passes"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Mel callbacks:"/>
	<attrString n="preRender" s="defaultRenderGlobals.preMel" t="string" h="Mel code executed before rendering"/>
	<attrString n="postRender" s="defaultRenderGlobals.postMel" t="string" h="Mel code executed after rendering"/>
	<attrString n="preLayer" s="defaultRenderGlobals.preRenderLayerMel" t="string" h="Mel code executed before each render layer"/>
	<attrString n="postLayer" s="defaultRenderGlobals.postRenderLayerMel" t="string" h="Mel code executed after each render layer"/>
	<attrString n="preFrame" s="defaultRenderGlobals.preRenderMel" t="string" h="Mel code executed before each frame"/>
	<attrString n="postFrame" s="defaultRenderGlobals.postRenderMel" t="string" h="Mel code executed after each frame"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="Verbosity:"/>
	<attr n="errorMsg" s="TurtleRenderOptions.errorPrint" t="boolean" h="Enable error messages"/>
	<attr n="warningMsg" s="TurtleRenderOptions.warningPrint" t="boolean" h="Enable warning messages"/>
	<attr n="benchmarkMsg" s="TurtleRenderOptions.benchmarkPrint" t="boolean" h="Enable benchmark messages"/>
	<attr n="progressMsg" s="TurtleRenderOptions.progressPrint" t="boolean" h="Enable progress messages"/>
	<attr n="infoMsg" s="TurtleRenderOptions.infoPrint" t="boolean" h="Enable info messages"/>
	<attr n="verboseMsg" s="TurtleRenderOptions.verbosePrint" t="boolean" h="Enable verbose messages"/>
	<attr n="debugMsg" s="TurtleRenderOptions.debugPrint" t="boolean" h="Enable debug messages"/>
	<attr n="saveMsg" s="TurtleRenderOptions.debugFile" t="boolean" h="Enable saving of messages to file"/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="*** Render option flags ***"/>
	<!-- ______________________________________________________________ -->
	<sep/>
	<sep desc="Memory and Performance Options:"/>
	-->
	<attr n="useSSE" s="TurtleRenderOptions.useSSE" t="boolean" h="Sets usage of SSE instructions."/>
	<attr n="tileSize" s="TurtleRenderOptions.tileSize" t="int" h="Sets the render tile size as a power of two (4 = 16x16, 5 = 32x32, 6 = 64x64, ...)"/>
	<mel n="renderThreads" P="1" s="TurtleRenderOptions.renderThreads %1; setAttr TurtleRenderOptions.autoThreads 0;" t="int" h="Sets the number of threads to use for rendering."/>
	<attr n="textureCache" s="TurtleRenderOptions.enableTextureCache" t="boolean" h="Enable the texture cache."/>
	<attr n="readOnlyCache" s="TurtleRenderOptions.readOnlyCache" t="boolean" h="Put the texture cache into read only mode."/>
	<attr n="textureTileSize" s="TurtleRenderOptions.textureTileSize" t="int" h="Set the texture cache tile size (16 = 16x16, 32 = 32x32, 64 = 64x64, ...)."/>
	<attr n="textureCacheSize" s="TurtleRenderOptions.textureCacheSize" t="int" h="Sets the total texture cache size (in MB)."/>
	<attr n="minimumTextureSize" s="TurtleRenderOptions.minimumTextureSize" t="int" h="Sets the min size of a texture to be cached (in MB). A smaller texture will not be put into the cache."/>
	<attr n="textureCompressionType" s="TurtleRenderOptions.textureCompressionType" t="int" h="Set the compression type to use in the cache."/>
	<attrString n="textureCacheDirectory" s="TurtleRenderOptions.textureCacheDirectory" t="string" h="Set the directory to store texture cache files."/>
	<sep/>

	<sep desc="Framebuffer:"/>
	<attr n="preMultiply" s="TurtleRenderOptions.preMultiply" t="boolean" h="Enables alpha premultiplication."/>
	<attr n="preMultiplyThreshold" s="TurtleRenderOptions.preMultiplyThreshold" t="float" h="Sets the premultiply threshold."/>
	<attr n="inputGammaCorrection" s="TurtleRenderOptions.inputGammaCorrection" t="boolean" h="Enables input gamma correction."/>
	<attr n="gammaInput" s="TurtleRenderOptions.gammaInput" t="float" h="Sets the input gamma."/>
	<attr n="outputGammaCorrection" s="TurtleRenderOptions.outputGammaCorrection" t="int" h="Enables output correction. 0=None, 1=Gamma, 2=sRGB"/>
	<attr n="gammaOutput" s="TurtleRenderOptions.gammaOutput" t="float" h="Sets the output gamma."/>
	<sep/>
	<sep desc="Override Options:"/>
	<attr n="ignoreLightLinks" s="TurtleRenderOptions.ignoreLightLinks" t="boolean" h="Disables all light linking."/>
	<attr n="rtQualityLimits" s="TurtleRenderOptions.rtQualityLimits" t="boolean" h="Enables ray tracing quality limits."/>
	<attr n="rtMaxShadowRays" s="TurtleRenderOptions.rtMaxShadowRays" t="int" h="Sets the max shadow rays if rtQualityLimits is enabled."/>
	<attr n="rtMaxGlossyRays" s="TurtleRenderOptions.rtMaxGlossyRays" t="int" h="Sets the max glossy rays if rtQualityLimits is enabled."/>
	<sep/>
	<!-- ______________________________________________________________ -->
	<sep desc="*** Remember to place 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."/>
</renderer>
