Skip to main content

vScriptValUnPacker

Flattens an array of lists and deals its values out to one to four arrays in turn.

IntermediateMograph / ScriptValScriptValArrayJSON
vScriptValUnPacker node

vScriptValUnPacker takes an array of numbers or lists of numbers and outputs its values as one flat array, or splits them across 2 to 4 arrays by position. The buttons 1 Array to 4 Arrays set the number of outputs.

Parameters​

ParameterTypeDefaultDescription
Custom Group SizeInteger1Hidden control. Number of output arrays, 1 to 4, default 1. The four buttons set it.
1 ArrayFloat—Button. Sets the node to 1 output array.
2 ArraysFloat—Button. Sets the node to 2 output arrays and adds the extra outputs.
3 ArraysFloat—Button. Sets the node to 3 output arrays and adds the extra outputs.
4 ArraysFloat—Button. Sets the node to 4 output arrays and adds the extra outputs.
+1 more parameters
ParameterTypeDefaultDescription
InputScriptVal—Data to process.
Read the full description

If the input holds lists, for example XYZ points, their values are first written into one flat list in order (x, y, z, x, y, z, ...). If it holds plain values, they are used as they are. The flat list is then dealt out to N arrays in turn: value 1 to array 1, value 2 to array 2, and so on, starting again at array 1 after array N.

With 3 outputs, XYZ points are split into an array of all X values, one of all Y values and one of all Z values. N is 1 by default and is set to 1 to 4 by the buttons, which also add the outputs OutputArray_1 to OutputArray_n. OutputArray holds the first array. Each output has the array and size wrapper.

Example Connections​

vScriptValPointsOnCircle.Output -> vScriptValUnPacker.ArrayA
vScriptValUnPacker.OutputArray -> vScriptValSin.ArrayA
vScriptValSin.Output -> vScriptValPacker.ArrayA
vScriptValPacker.Output -> vScriptValCameraProjection.ArrayA