User guide
227
The following example script defines a function that produces a sequence with each entry containing the name of an
output, the path for the image files it produces, and the temporary file location:
def outputNames(nodeName):
"""
Get the render outputs of a render node
"""
# Get hold of the node and all of its dependencies as a dictionary
node = NodegraphAPI.GetNode(nodeName)
info = FarmAPI.GetSortedDependencyList( [ node ] )
# Extract the names of the outputs
# of a render node
allDeps = [
# The output information
(
# Name
output["name"],
# Location
output["outputLocation"],
# Temp location
output["tempRenderLocation"]
)
# Each info entry
for i in info
# We only want the info for our particular node
if i["name"] == nodeName
# We only want output info
for output in i["outputs"]
]
return allDeps
File Browser Example
The following example plug-in retrieves rendering information and dumps it to a JSON file. The UI4 module is used to
display a File Browser dialog window:
from Katana import FarmAPI, Callbacks
import json
def writeRenderInfo(**kwargs):
from Katana import UI4
28 RENDER FARM API | FILE BROWSER EXAMPLE