Select the Pin of the perset you want (Convert to "Integer"(XOD/Math/Round) first if you have a "Float" Value(A number with a Decimal point)).
preset-select
@/preset-select
Select the Pin of the perset you want (Convert to "Integer"(XOD/Math/Round) first if you have a "Float" Value(A number with a Decimal point)).
Selectnumber
Packed Input to Output. 1.. 2.. 3.. - 6 Ect...
IN1@/preset-pack
Packed input 1
IN2@/preset-pack
Packed input 2
IN3@/preset-pack
Packed input 3
IN4@/preset-pack
Packed input 4
IN5@/preset-pack
Packed input 5
IN6@/preset-pack
Packed input 6
OUT@/preset-pack
Packed Output
To use the node in your project you should have the bradzilla84/preset-select library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.
C++ implementation
struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
int Pick = getValue<input_Select>(ctx);
switch (Pick){
case 1: // if input 1 is selected
emitValue<output_OUT>(ctx, getValue<input_IN1>(ctx)); //See IN1 pin name
break;
case 2: // if input 2 is selected
emitValue<output_OUT>(ctx, getValue<input_IN2>(ctx)); //See IN2 pin name
break;
case 3: // if input 3 is selected
emitValue<output_OUT>(ctx, getValue<input_IN3>(ctx)); //See IN3 pin name
break;
case 4: // if input 4 is selected
emitValue<output_OUT>(ctx, getValue<input_IN4>(ctx)); //See IN4 pin name
break;
case 5: // if input 5 is selected
emitValue<output_OUT>(ctx, getValue<input_IN5>(ctx)); //See IN5 pin name
break;
case 6: // if input 6 is selected
emitValue<output_OUT>(ctx, getValue<input_IN6>(ctx)); //See IN6 pin name
break;
}
}