RenderingAPI

Render Output Location

RenderingAPI.RenderOutputLocation.GetPlugin(pluginName: unicode) → object

Returns the RenderOutputLocaton plugin with the given name, or None if there is no such plugin.

RenderingAPI.RenderOutputLocation.GetPluginNames() → list

Returns a list containing the names of all available RenderOutputLocation plugins.

class RenderingAPI.RenderOutputLocation.RenderOutputLocationPlugin

Bases: pybind11_builtins.pybind11_object

Render output location plugin

__init__

x.__init__(...) initializes x; see help(type(x)) for signature

computeFilePath(outputAttrs: dict, locationAttrs: dict, renderSettingsAttr: dict, imageInfo: dict, makeVersionTemplate: bool) → str

Use this RenderOutputLocation plugin to resolve a file path for the render. The first three arguments should be dictionaries of string to string or FnAttribute.Attribute.

computeLocation(outputAttrs: dict, locationAttrs: dict, renderSettingsAttr: dict, imageInfo: dict) → str

Use this RenderOutputLocation plugin to compute a location for the render. The first three arguments should be dictionaries of string to string or FnAttribute.Attribute.

getLocationSettingsAttr(outputType: unicode, incomingOutputAttr: PyFnAttribute.GroupAttribute) → PyFnAttribute.GroupAttribute

Returns the location settings for this plugin as a GroupAttribute.

Render Outputs

RenderingAPI.RenderOutputs.GetDefaultRendererSettingsAttr(outputType, producer=None, producerBaseName=None)
RenderingAPI.RenderOutputs.GetRenderOutputs(client, includeMerge=False)

Render Plugins

RenderingAPI.RenderPlugins.GetAllRenderMethods(includeInternal=False)
Return type:list of dict
Parameters:includeInternal (bool) – Whether to include render methods of internal render plug-ins.
Returns:A list containing the render methods of the available render plug-ins. Each entry in the list a dictionary.
RenderingAPI.RenderPlugins.GetBatchRenderMethodForRenderer(rendererName)
RenderingAPI.RenderPlugins.GetDefaultRendererPluginName()

Returns the value of "DEFAULT_RENDERER" set in the Configuration singleton.

Return type:str or None
Returns:The name of the currently set default renderer plug-in.
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 3
Parameters: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, includeInternal=False)
Return type:

list of str

Parameters:
  • includeViewer (bool) – Whether to include render plug-ins associated with viewer plug-ins.
  • includeInternal (bool) – Whether to include render plug-ins internal to Katana.
Returns:

A list containing the names of the available render plug-ins.

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.
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.

Renderer

RenderingAPI.Renderer.GetPlugin(pluginName: unicode, producer: GEOLIB::GeometryProducer) → object

Returns the renderer plugin with the given root producer and name. If the plugin cannot be found, or cannot be initialized, None is returned.

RenderingAPI.Renderer.ReleaseManager() → None

Release the renderer plugin manager.

class RenderingAPI.Renderer.RendererPlugin

Bases: pybind11_builtins.pybind11_object

Renderer plugin

__init__

x.__init__(...) initializes x; see help(type(x)) for signature

configureDiskRenderOutputProcess(outputName: unicode, outputPath: unicode, renderMethodName: unicode, frameTime: float) → PyFnAttribute.GroupAttribute

Get render output process information wrapped in a GroupAttribute.

RendererInfo

RenderingAPI.RendererInfo.FlushPluginCaches()
RenderingAPI.RendererInfo.GetPlugin(arg0: unicode) → object
RenderingAPI.RendererInfo.ReleaseManager() → None

Release the RendererInfo plugin manager.

class RenderingAPI.RendererInfo.RendererInfoPlugin

Bases: pybind11_builtins.pybind11_object

Renderer info plug-in

__init__

x.__init__(...) initializes x; see help(type(x)) for signature

addObjectLocation(type: unicode, location: unicode) → None

Adds a filename or asset ID location directly to the list of renderer objects for ths given primary type.

clearObjectLocations(type: unicode = u'') → None

Clears the list of additional filenames and asset IDs. If type is specified, only clears the specified list; otherwise, all lists are cleared.

getBatchRenderMethod() → PyFnAttribute.GroupAttribute

Returns the supported batch render method, wrapped in a GroupAttribute

getLiveRenderTerminalOps(stateArgs: PyFnAttribute.GroupAttribute) → list

Returns a list of terminal Ops to be used during Live Rendering. The list contains 2-tuples, where the first element of each tuple is the opType, while the second element is a GroupAttribute containing the opArgs.

getRegisteredRendererName() → str

Returns the registered renderer name that corresponds to this renderer info plugin.

getRegisteredRendererVersion() → str

Returns the registered renderer version that corresponds to this renderer info plugin.

getRenderMethods() → PyFnAttribute.GroupAttribute

Returns a list of supported render methods, wrapped in a GroupAttribute.

getRenderTerminalOps(stateArgs: PyFnAttribute.GroupAttribute) → list

Returns a list of terminal Ops to be used during the specificed render mode.

getRendererCoshaderType() → str

Returns the co-shader type, if it exists.

getRendererObjectDefaultType(type: unicode) → str

Returns the default output type name for a given input type (e.g. ‘shader’).

getRendererObjectInfo(name: unicode, typeTag: unicode, data: object = None) → Geolib3::internal::FnRendererInfo::FnRendererObjectInfo

Returns info for a renderer object by name and type. Input data can be provided as an Attribute.

getRendererObjectNames(*args, **kwargs)

Overloaded function.

  1. getRendererObjectNames(self: RenderingAPI_cmodule.RendererInfo.RendererInfoPlugin, type: unicode, typeTag: unicode) -> list

Returns a list of names of objects provided by this renderer, filtered by primary type and the optional typeTag.

  1. getRendererObjectNames(self: RenderingAPI_cmodule.RendererInfo.RendererInfoPlugin, type: unicode, typeTags: List[unicode] = []) -> list

Returns a list of names of objects provided by this renderer, filtered by primary type and optional typeTags.

getRendererObjectTypes(type: unicode) → list

Returns a list of names of object types provided by this renderer for a given input type (e.g. ‘shader’).

getRendererShaderTypeTags(shaderType: unicode) → list

Returns a list of names of shader types (e.g. surface, displacement) provided by this renderer.

getShaderInputNames(shader: unicode) → list

Returns a list of names of inputs for a given shader.

getShaderInputTags(shader: unicode, inputName: unicode) → list

Returns a list of tags for a given shader input.

getShaderOutputNames(shader: unicode) → list

Returns a list of names of outputs for a given shader.

getShaderOutputTags(shader: unicode, outputName: unicode) → list

Returns a list of tags for a given shader output.

isNodeTypeSupported(nodeType: unicode) → bool

Returns True if the renderer supports the given nodeType. Currently Katana will call this function to determine whether the renderer supports ShadingNode and OutputChannelDefine.

isPolymeshFacesetSplittingEnabled() → bool

Returns whether polymesh faces are split into sub-meshes where each mesh represents a single face set, as required by some renderers.

isPresetLocalFileNeeded(outputType: unicode) → bool

Returns whether a renderer output requires a pre-declared temp file (accessible in scene graph with implicit resolvers).

setKatanaPath(katanaPath: unicode) → None

Sets Katana’s directory so that this plugin can access its resources.

setPluginPath(pluginPath: unicode) → None

Sets the renderer info plugin directory.

setPluginRootPath(pluginPath: unicode) → None

Sets this renderer info plugin’s root directory so that it can access its resources.

setTmpPath(tmpPath: unicode) → None

Sets the current session’s temporary directory so that this plugin can use it.

setTypeTagNameFilter(filter: unicode, typeTag: unicode) → None

Set a filename-style match string for automatically assigning a typeTag based on object name.

class RenderingAPI.RendererInfo.RendererObjectInfo

Bases: pybind11_builtins.pybind11_object

Renderer object info

__init__

x.__init__(...) initializes x; see help(type(x)) for signature

getContainerHints() → PyFnAttribute.Attribute

Returns a GroupAttribute 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() → int

Returns this renderer object’s output type (one of the kRendererObjectValueType* constants).

getParam(name: unicode) → object

Returns an individual parameter by name, or None if it doesn’t exist.

getParams() → list

Returns a list of parameters.

getType() → str

Returns the primary type of the renderer object.

getTypeTags() → list

Returns additional type tags for the renderer object.

class RenderingAPI.RendererInfo.RendererObjectParamInfo

Bases: pybind11_builtins.pybind11_object

Renderer object param info

__init__

x.__init__(...) initializes x; see help(type(x)) for signature

getArraySize() → int

Returns the array size of this parameter, or 0 if it contains a single value.

getDefault() → object

Returns an FnAttribute containing default value(s) for this parameter.

getEnums() → object

Returns an FnAttribute containing enums for this parameter, or None if this parameter has no enums.

getHints() → object

Returns an FnAttribute containing hints for this parameter, or None if the parameter has no hints.

getName() → str

Returns the name of this parameter.

getType() → int

Returns the type of this parameter (one of the kRendererObjectalueType* constants).