Modifier.createrefΒΆ
Creates a reference
Options is a table of options and value. Possible options are:
- prefixnodes: the referenced nodes are prefixed with the reference name when true
- containschildren: the referenced nodes are loaded as children of the Reference, instead of loading in the Document when true
- roots: the list of paths to be moved as root in the reference, with all other nodes discarded
- invalidpolicy: 'continue' to prevent the loader from popping a message box in ui mode if the reference is missing.
For example:
local m = Document:modify ()
-- foo is loaded without prefix and nodes as children of the reference node
mod.createref('foo', '/path/to/my/alembic.abc', nil, {prefixnodes=false,containschildren=true})
Arguments:
name The reference name, which is used as referenced nodes prefixfilename The reference file nameparent The node where to create the reference and its contentoptions Reference optionsnohostrefs When true, the reference will not load any HostReference
Return:
reference,nodes The newly create reference node and the list of root nodes that were created