Loading and writing of .ass (Arnold Scene Source) scene files. More...
Functions | |
AI_API AI_DEPRECATED int | AiASSWrite (AtUniverse *universe, const char *filename, int mask=AI_NODE_ALL, bool open_procs=false, bool binary=true) |
Write all nodes in the given universe to an .ass file. More... | |
AI_API AI_DEPRECATED int | AiASSWriteWithMetadata (AtUniverse *universe, const char *filename, int mask=AI_NODE_ALL, bool open_procs=false, bool binary=true, const AtMetadataStore *mds=NULL) |
Write all nodes in a given universe to an .ass file, including metadata. More... | |
AI_API AI_DEPRECATED int | AiASSLoad (AtUniverse *universe, const char *filename, int mask=AI_NODE_ALL) |
Load all nodes from an .ass file into a specific Arnold universe. More... | |
Loading and writing of .ass (Arnold Scene Source) scene files.
This is deprecated in favor of ai_scene.h and its AiScene* methods.
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 AI_DEPRECATED int AiASSWrite | ( | AtUniverse * | universe, |
const char * | filename, | ||
int | mask, | ||
bool | open_procs, | ||
bool | binary | ||
) |
Write all nodes in the given universe 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.
universe | universe whose contents will be written to .ass (NULL for default universe) |
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 AI_DEPRECATED int AiASSWriteWithMetadata | ( | AtUniverse * | universe, |
const char * | filename, | ||
int | mask, | ||
bool | open_procs, | ||
bool | binary, | ||
const AtMetadataStore * | mds | ||
) |
Write all nodes in a given universe to an .ass file, including metadata.
See AiASSWrite
universe | universe whose contents will be written to .ass (NULL for default universe) |
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 |
mds | optional metadata store for writing metadata into the file |
AI_API AI_DEPRECATED int AiASSLoad | ( | AtUniverse * | universe, |
const char * | filename, | ||
int | mask | ||
) |
Load all nodes from an .ass file into a specific Arnold universe.
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.
universe | universe where the nodes will be created (NULL for default universe) |
filename | input filename |
mask | only read nodes with types included in the mask (default is AI_NODE_ALL) |