reference¶
-
reference(root: Node, filepath: unicode, reference_root_name: unicode) → 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 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.
Return type: Raises: RuntimeError – if the file can’t be loaded.