Amazon VERSION 2.0V1 Podręcznik Użytkownika Strona 227

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 264
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 226
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
Przeglądanie stron 226
1 2 ... 222 223 224 225 226 227 228 229 230 231 232 ... 263 264

Komentarze do niniejszej Instrukcji

Brak uwag