Modifier.createrefΒΆ

Reference,{Node} reference,nodes Modifier.createref ( string name , string filename , [ Node parent ] , [ table options ] , [ boolean nohostrefs ] )

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

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 prefix
  • filename The reference file name
  • parent The node where to create the reference and its content
  • options Reference options
  • nohostrefs 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