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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 264
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 227
228
renderNodeInfo = FarmAPI.GetSortedDependencyList()
farmFilePath = UI4.Util.AssetId.BrowseForAsset
(
'', 'Specify a filename', \
True,{'fileTypes':'json','acceptDir': False}
)
with open(farmFilePath, "w") as farmFile:
farmFile.write(
json.dumps(
renderNodeInfo
)
)
def onStartup(**kwargs):
FarmAPI.AddFarmMenuOption("Display Out", \
writeRenderInfo)
Callbacks.addCallback(Callbacks.Type.onStartup, onStartup)
Custom Dialog
The default dialog is a starting point for a farm plug-in dialogue window, but for a custom plug-in, it may be
necessary to create a custom dialog window. In this case PyQT and the UI4 module should be used.
Errors, Warnings and Scene Validation
It is useful to check particular conditions of a recipes state before submitting it to a render-farm. For example, the
recipe should have no unsaved changes, so that what is rendered is consistent with what is displayed in Katana.
The utility IsSceneValid() checks for unsaved changes, and returns a boolean with a value of True if the recipe is
eligible for submission. For example:
eligibleForSubmission = FarmAPI.IsSceneValid(
nodeScope = FarmAPI.NODES_ALL,
allowUnsavedChanges=False,
allowCapitalLetters=False,
allowDigits=False,
unwantedSymbols=["_"]
)
The nodeScope argument specifies which nodes are submitted. The argument value is stored in the internal state of
the Farm API and can be retrieved with GetNodeProcessType(), which returns one of the following:
NODES_SINGLE
28 RENDER FARM API | ERRORS, WARNINGS AND SCENE VALIDATION
Przeglądanie stron 227
1 2 ... 223 224 225 226 227 228 229 230 231 232 233 ... 263 264

Komentarze do niniejszej Instrukcji

Brak uwag