RenderingAPI¶
Render Output Location¶
-
RenderingAPI.RenderOutputLocation.
GetPlugin
()¶
-
RenderingAPI.RenderOutputLocation.
GetPluginNames
()¶
-
class
RenderingAPI.RenderOutputLocation.
RenderOutputLocationPlugin
¶ Bases:
object
render output location plugin
-
__init__
¶ x.__init__(...) initializes x; see help(type(x)) for signature
-
__new__
(S, ...) → a new object with type S, a subtype of T¶
-
computeFilePath
(outputAttrs, locationAttrs, renderSettingsAttrs, imageInfo, makeVersionTemplate) → string¶ Uses the RenderOutputLocation plugin to resolve a file path for the render. The first three arguments should be dictionaries of string -> string or dictionaries of string -> FnAttribute.Attribute. makeVersionTemplate should be an boolean value.
-
computeLocation
(outputAttrs, locationAttrs, renderSettingsAttrs, imageInfo) → string¶ Uses the RenderOutputLocation plug-in to compute a location for the render. Arguments should be dictionaries of string -> string or dictionaries of string -> FnAttribute.Attribute.
-
getLocationSettingsAttr
() → GroupAttr¶ TODO
-
Render Outputs¶
-
RenderingAPI.RenderOutputs.
GetDefaultRendererSettingsAttr
(outputType, producer=None, producerBaseName=None)¶
-
RenderingAPI.RenderOutputs.
GetRenderOutputs
(client, includeMerge=False)¶
Render Plugins¶
-
RenderingAPI.RenderPlugins.
GetAllRenderMethods
()¶
-
RenderingAPI.RenderPlugins.
GetBatchRenderMethodForRenderer
(rendererName)¶
-
RenderingAPI.RenderPlugins.
GetDefaultRendererPluginName
()¶ Use the Configuration Singleton to get the default renderer. If there is no entry in the Singleton then returns the first available renderer.
-
RenderingAPI.RenderPlugins.
GetInfoPlugin
(rendererName)¶
-
RenderingAPI.RenderPlugins.
GetInfoPluginName
(rendererName)¶
-
RenderingAPI.RenderPlugins.
GetInfoPluginNameForShaderType
(shaderType)¶
-
RenderingAPI.RenderPlugins.
GetOutputChannelAttr
(rendererName, dynamicOnly=False)¶ Retrieves a renderer’s output channel settings from the RendererInfoPlugin and applies some processing before returning the attributes and hints.
This is used both in GetOutputChannelDynamicParameters above as well as the OutputChannelDefineDefaultAttrProducer.
-
RenderingAPI.RenderPlugins.
GetOutputChannelDynamicParameters
(rendererName)¶ Attributes defined in xxxRendererInfo.cpp can have dynamic parameter groups. For Arnold for example, this would be filter and driver.
Once the filter value is changed, the ‘filterParameters’ group is automatically reloaded. To specify this relationship, two hints can be set on the attribute (in this case ‘filter’):
- dynamicParameters: filterParameters
- dynamicParametersType: kFnRendererObjectTypeFilter
This function extracts these two flags from a renderer’s output channel settings.
-
RenderingAPI.RenderPlugins.
GetOutputChannelGlobalStatementsAttr
(rendererName)¶ Builds the hints on the xxxGlobalStatements level.
For example the page hint for Arnold.
-
RenderingAPI.RenderPlugins.
GetOutputChannelParameters
(rendererName)¶ Returns a list of output channel parameters.
Used by GetOutputChannelAttr and the generic OutputChannelDefine node.
-
RenderingAPI.RenderPlugins.
GetProcessedParams
(paramList, hintDict={})¶ Iterates over a list of parameters from a RendererInfoPlugin and adds additional hints for better formatting.
This is used in GetOutputChannelAttr above as well as from within the OutputChannelDefineDefaultAttrProducer.
-
RenderingAPI.RenderPlugins.
GetRenderMethodByName
(methodName, rendererName=None)¶
-
RenderingAPI.RenderPlugins.
GetRenderMethodForRendererAndMethodName
(rendererName, methodName, includeBatch=True)¶
-
RenderingAPI.RenderPlugins.
GetRenderMethodsForRenderer
(rendererName)¶
-
RenderingAPI.RenderPlugins.
GetRendererPluginDir
(name)¶
-
RenderingAPI.RenderPlugins.
GetRendererPluginDisplayColor
(rendererName)¶ Gets the display color that has been set for a renderer plugin.
Return type: tuple
of length 3Parameters: rendererName ( str
) – The registered name of the Renderer Plugin.Returns: The Display Color that has been set for the Renderer Plugin or None
if no name has been set.
-
RenderingAPI.RenderPlugins.
GetRendererPluginDisplayName
(rendererName)¶ Gets the display name that has been set for a Renderer Plugin.
Return type: str
Parameters: rendererName ( str
) – The registered name of the Renderer Plugin.Returns: The Display Name that has been set for a Renderer Plugin or None
if no name has been set.
-
RenderingAPI.RenderPlugins.
GetRendererPluginNameForShaderType
(shaderType)¶
-
RenderingAPI.RenderPlugins.
GetRendererPluginNames
(includeViewer=True)¶
-
RenderingAPI.RenderPlugins.
GetRendererSettingsAttr
(outputType, producer=None, producerBaseName=None)¶
-
RenderingAPI.RenderPlugins.
GetRendererShaderTypeAttrPrefixes
(rendererName=None)¶
-
RenderingAPI.RenderPlugins.
GetRendererShaderTypeParamsAttr
(rendererName=None)¶
-
RenderingAPI.RenderPlugins.
GetRendererShaderTypeShaderAttr
(rendererName=None)¶
-
RenderingAPI.RenderPlugins.
GetRendererShaderTypes
(renderer=None)¶
-
RenderingAPI.RenderPlugins.
SetRendererPluginDisplayColor
(rendererName, color)¶ Sets the display color to use for a renderer plugin.
Parameters: - rendererName (
str
) – The registered name of the Renderer Plugin. - color (A sequence of length 3) – The Display Color to use for the Renderer Plugin.
- rendererName (
-
RenderingAPI.RenderPlugins.
SetRendererPluginDisplayName
(rendererName, displayName)¶ Enables the setting of a Display Name for a Renderer Plugin.
Parameters: - rendererName (
str
) – The registered name for the Renderer Plugin. - displayName (
str
) – The Display Name to set for the Renderer Plugin.
- rendererName (
Renderer¶
-
RenderingAPI.Renderer.
GetPlugin
()¶
-
RenderingAPI.Renderer.
ReleaseManager
()¶
-
class
RenderingAPI.Renderer.
RendererPlugin
¶ Bases:
object
renderer plugin
-
__init__
¶ x.__init__(...) initializes x; see help(type(x)) for signature
-
__new__
(S, ...) → a new object with type S, a subtype of T¶
-
configureDiskRenderOutputProcess
(outputName, outputPath, outputFileName, renderMethodName, frameTime) → GroupAttr¶ Get render output process information wrapped in a group attribute.
-
RendererInfo¶
-
RenderingAPI.RendererInfo.
FlushPluginCaches
()¶
-
RenderingAPI.RendererInfo.
GetPlugin
()¶
-
RenderingAPI.RendererInfo.
ReleaseManager
()¶
-
class
RenderingAPI.RendererInfo.
RendererInfoPlugin
¶ Bases:
object
renderer info plug-in
-
__init__
¶ x.__init__(...) initializes x; see help(type(x)) for signature
-
__new__
(S, ...) → a new object with type S, a subtype of T¶
-
addObjectLocation
(type, location)¶ Adds a filename or asset ID location directly to the list of renderer objects for the given primary type.
-
clearObjectLocations
()¶ clearObjectLocations(type) Clears the list of additional filenames and asset IDs. If type is specified, only clears the specified list. Otherwise, clears all lists.
-
getBatchRenderMethod
() → GroupAttr¶ Returns the supported batch render method wrapped in a group attribute.
-
getLiveRenderTerminalOps
(stateArgs) → [(opType, opArgs), (opType, opArgs), ...]¶ Returns a list of terminal Ops to be used during Live Rendering.
-
getRegisteredRendererName
() → str¶ Returns the registered renderer name that corresponds to this renderer info plug-in.
-
getRegisteredRendererVersion
() → str¶ Returns the registered renderer version that corresponds to this renderer info plug-in.
-
getRenderMethods
() → GroupAttr¶ Returns a list of supported render methods wrapped in a group attribute.
-
getRenderTerminalOps
(stateArgs) → [(opType, opArgs), (opType, opArgs), ...]¶ Returns a list of terminal Ops to be used during specified render mode.
-
getRendererCoshaderType
() → str¶ Returns the co-shader type if it exists.
-
getRendererObjectDefaultType
(type) → str¶ Returns the default output type name for a given input type (e.g. shader).
-
getRendererObjectInfo
(name, type, inputData) → RendererObjectInfo¶ Returns info for a renderer object by name and type. Input data can be provided as Attribute (optional).
-
getRendererObjectNames
(type, typeTags) → [str, str, ...]¶ Returns a list of names of objects provided by this renderer, filtered by primary type and optional typeTags.
-
getRendererObjectTypes
(type) → [str, str, ...]¶ Returns a list of names of object types provided by this renderer for a given input type (e.g. shader).
-
getRendererShaderTypeTags
(shaderType) → [str, str, ...]¶ Returns a list of names of shader types (surface, displacement, etc.) provided by this renderer.
-
getShaderInputNames
(shader) → [str, str, ...]¶ Returns a list of names of inputs for a given shader.
-
getShaderInputTags
(shader, inputName) → [str, str, ...]¶ Returns a list of tags for a given shader input.
-
getShaderOutputNames
(shader) → [str, str, ...]¶ Returns a list of names of outputs for a given shader.
-
getShaderOutputTags
(shader, outputName) → [str, str, ...]¶ Returns a list of tags for a given shader output.
-
isNodeTypeSupported
(nodeType) → str¶ Katana will call this function to determine if the renderer supports specific nodes. Currently ShadingNode and OutputChannelDefine will be queried. True should be returned if the renderer supports this node type.
-
isPolymeshFacesetSplittingEnabled
() → str¶ Declares if polymesh faces are split into sub-meshes where each mesh represents a single face set as required by some renderers.
-
isPresetLocalFileNeeded
() → str¶ Declares if a renderer output requires a pre-declared temp file (accessible in scene graph with implicit resolvers).
-
setKatanaPath
(katanaPath)¶ Sets Katana’s directory so that the plug-in can access its resources.
-
setPluginPath
(pluginPath)¶ Sets the renderer info plug-in directory.
-
setPluginRootPath
(pluginRootPath)¶ Sets the renderer info plug-in’s root directory so that the plug-in can access its resources.
-
setTmpPath
(tmpPath)¶ Sets the current session’s temporary directory so that the plug-in uses it.
-
setTypeTagNameFilter
(filter, typeTag)¶ Set a filename-style match string for automatically assigning a typeTag based on object name.
-
-
class
RenderingAPI.RendererInfo.
RendererObjectInfo
¶ Bases:
object
renderer object info
-
__init__
¶ x.__init__(...) initializes x; see help(type(x)) for signature
-
__new__
(S, ...) → a new object with type S, a subtype of T¶
-
getContainerHints
() → ScenegraphAttr.Attr¶ Returns a group attribute of container hints.
-
getFullPath
() → str¶ Returns the absolute filename of the renderer object (if applicable).
-
getLocation
() → str¶ Returns the relative filename or asset ID of the renderer object.
-
getName
() → str¶ Returns the name of the renderer object.
-
getOutputType
() → str¶ Returns the renderer object’s output type (one of the kRendererObjectValueType* constants).
-
getParam
(string) → param¶ Returns an individual parameter by name or None if it doesn’t exist.
-
getParams
() → [param, param, ...]¶ Returns a list of parameters.
-
getType
() → str¶ Returns the primary type of the renderer object.
-
getTypeTags
() → [str, str, ...]¶ Returns additional type tags for the renderer object.
-
-
class
RenderingAPI.RendererInfo.
RendererObjectParamInfo
¶ Bases:
object
renderer object param info
-
__init__
¶ x.__init__(...) initializes x; see help(type(x)) for signature
-
__new__
(S, ...) → a new object with type S, a subtype of T¶
-
getArraySize
() → int¶ Returns the array size of the parameter, or 0 if it contains a single value.
-
getDefault
() → ScenegraphAttr.Attr¶ Returns an attribute containing default value(s) for the parameter.
-
getEnums
() → ScenegraphAttr.Attr¶ Returns an attribute containing enums for the parameter, or None if the parameter has no enums.
-
getHints
() → ScenegraphAttr.Attr¶ Returns an attribute containing hints for the parameter, or None if the parameter has no hints.
-
getName
() → str¶ Returns the name of the parameter.
-
getType
() → int¶ Returns the type of the parameter (one of the kRendererObjectValueType* constants).
-