reference
- reference(root: Node, filepath: unicode, reference_root_name: unicode, progress: ProgressCallback) Node
Reference the content of a file into the project.
Load and reference the file content inside the root node. The content will be read-only, only the root node attributes are mutable. Any supported file format (.rumbanode/.guerillanode and .abc right now) can be referenced.
- Parameters
root (Node) – The document node where to add the file content
filepath (unicode) – The file path
reference_root_name (unicode) – Some file format (like alembic) have to gather the file content into a single node. In that case, reference_root_name is the root node name of the file content. If reference_root_name is empty, the filename is used.
progress (ProgressCallback) – The optional progress object to track the loading progression
- Return type
- Raises
RuntimeError – if the file can’t be loaded.