Outputs either input string depending on condition
if-else(string)
@/if-else(string)
Deprecated: Use the generic `xod/core/if-else` instead
Outputs either input string depending on condition
Rstring
Outputs string from `T` if `COND` is true, and `F` otherwise
#pragma XOD dirtieness disable
node {
void evaluate(Context ctx) {
auto cond = getValue<input_COND>(ctx);
auto trueVal = getValue<input_T>(ctx);
auto falseVal = getValue<input_F>(ctx);
emitValue<output_R>(ctx, cond ? trueVal : falseVal);
}
}
COND | T | F | R |
---|
true | "It's true" | "It's false" | "It's true" |
false | "It's true" | "It's false" | "It's false" |