Function nsi::toolbelt::insert

source ·
pub fn insert<'a, 'b, 'c>(
    ctx: &'a Context<'_>,
    to: &'b str,
    to_slot: Option<&str>,
    handle: &'c str,
    handle_slot: Option<&str>,
    from: &str
) -> (&'b str, &'c str)where
    'a: 'b,
    'a: 'c,
Expand description

Insert node handle in-between to and from.

Arguments

  • to – Node to connect to downstream.

  • to_slot – Slot on to node to connect to. If None, "objects" is used. .

  • handle – Handle of node to insert.

  • handle_slot – Slot on handle node to connect to. If None, "objects" is used.

  • from – Node to connect to upstream.

Returns (to, handle).

Example

// Insert the node "tetrahedron" between the ".root" and
// "terahedron_attrib" nodes.
insert(
    &ctx,
    ".root",
    None,
    "tetrahedron",
    Some("geometryattributes"),
    "terahedron_attrib",
);