Functions | |
AI_API int | AiASSWrite (const char *filename, int mask=AI_NODE_ALL, bool open_procs=false, bool binary=true) |
Write all nodes in the scene to an .ass file. More... | |
AI_API int | AiASSLoad (const char *filename, int mask=AI_NODE_ALL) |
Load all nodes from an .ass file into Arnold. More... | |
Arnold has built-in support for writing scene data to a file and later reading the file in. Although not required, the extension for these files is usually .ass, which stands for Arnold Scene Source. The file format is a straightforward mapping from Arnold AtNode's to human-readable ASCII. For example, a sphere node is written as:
AI_API int AiASSWrite | ( | const char * | filename, |
int | mask, | ||
bool | open_procs, | ||
bool | binary | ||
) |
Write all nodes in the scene to an .ass file.
This function can selectively write all nodes of a given type to an .ass file. For example, to write light nodes and camera nodes only, use:
To write all nodes of all types, use:
Just like AiASSLoad(), this function has built-in gzip compression. If filename
ends in ".gz", the generated file will be automatically compressed.
filename | output filename |
mask | only write the desired types of nodes |
open_procs | if set, then all procedurals will be recursively expanded |
binary | allow binary encoding in .ass files |
AI_API int AiASSLoad | ( | const char * | filename, |
int | mask | ||
) |
Load all nodes from an .ass file into Arnold.
This function automatically recognizes gzip-compressed files; first, it tries to load filename and, if not found, it will add the suffix ".gz" and try again before finally giving up.
If the filename is "-", it reads data from stdin.
Any forward references due to linked nodes will be automatically resolved at the end of the file. The order in which nodes appear in the file is irrelevant.
filename | input filename |
mask | only read nodes with types included in the mask (default is AI_NODE_ALL) |