Skip to main content

Select Masks πŸŽ₯πŸ…₯πŸ…—πŸ…’

Video Helper Suite πŸŽ₯πŸ…₯πŸ…—πŸ…’/mask
VHS_SelectMasks

Use comma-separated indexes to select items in the given order. Supports negative indexes, python-style ranges (end index excluded), as well as range step. Acceptable entries (assuming 16 items provided, so idxs 0 to 15 exist): 0 -> Returns [0] -1 -> Returns [15] 0, 1, 13 -> Returns [0, 1, 13] 0:5, 13 -> Returns [0, 1, 2, 3, 4, 13] 0:-1 -> Returns [0, 1, 2, ..., 13, 14] 0:5:-1 -> Returns [4, 3, 2, 1, 0] 0:5:2 -> Returns [0, 2, 4] ::-1 -> Returns [15, 14, 13, ..., 2, 1, 0]

Example

JSON Example
{
  "class_type": "VHS_SelectMasks",
  "inputs": {
    "mask": [
      "node_id",
      0
    ],
    "indexes": "0",
    "err_if_missing": true,
    "err_if_empty": true
  }
}

This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.

Inputs

NameTypeStatusConstraintsDefault
maskMASKrequired--
indexesSTRINGrequired-"0"
err_if_missingBOOLEANrequired-true
err_if_emptyBOOLEANrequired-true

Outputs

IndexNameTypeIs ListConnection Reference
0MASKMASKNo["{node_id}", 0]
How to connect to these outputs

To connect another node's input to an output from this node, use the connection reference format:

["node_id", output_index]

Where node_id is the ID of this VHS_SelectMasks node in your workflow, and output_index is the index from the table above.

Example

If this node has ID "5" in your workflow:

  • MASK (MASK): ["5", 0]
Was this page helpful?