Matrix dynamic props

Hello!

I meet some difficulties with the matrix props. I want to change the alphaFillOff depending of a value dynamically.

I test a first methode, but as expect it’s work only for the init :

if (OSC{/preset/recall} != $) {
   props.alphaFillOff = 0.1;
   } else {
props.alphaFillOff = 0.5;
}

So, I tried to put on alphaFillOff this formula :

props.alphaFillOff = "#{(OSC{/preset/recall} != $) ? "0.1" : "0.5"}";

I test it on a seperate button, and it working perfectly. But not on the matrix.

Anyone could help me ?
Here the minimal session file : matrix-props.json (23.9 KB)
Cheers.

https://openstagecontrol.ammd.net/docs/widgets/properties-reference/#matrix_props:
Advanced syntax blocks (@{}, OSC{}, JS{{}} and #{}) are resolved at the matrix’ scope (ie @{this.variables} returns the matrix’ variables property, not its parent’s)

If you want to have scoped advanced syntaxes you’ll need to use a matrix of clone widgets instead (see clones_and_variables.json example from this thread).

I'm considering adding a way to pass these syntaxes to the matrix' children without interpreting them to make this kind of situations easier.

Hello!
Thanks for this solution. When do you exept to improve the syntax for the matrix ? Just to know if I wait an update or not.

Cheers

I don’t know, I have made some tests but nothing satisfying came up for now.

Hello @jean-emmanuel, I would like to know if the syntax for the matrix is still planned?

Yes, I'll probably go for "#_{}", "@_{}", "OSC_{}", etc, as a way to pass advanced syntaxes to the matrix' children without resolving them.