Update Canvas from another widget or custom variable

Hey guys,

How can we update the a canvas widget manually from another widget (lets say a fader, or a custom variable)? Using continuous mode works, but that maybe is a bit overkill for my task. Simple example here, how can I do the canvas updates when I play with the fader "seqPos?
Canvas_Manual_Refresh.json (4.9 KB)

I was wondering if there is someway to have a function like "canvasUpdate()" which could be invoked from any widget?

Thanks a lot in advance!

It's not possible yet, but I'll add this when I get to work on o-s-c again (most likely in september).

3 Likes

great to hear that jean-emmanuel! Really looking forward to it. Thanks a lot <3

Love that updateCanvas is now a scripting function!

I have a question though... It seems that whenever I call updateCanvas, it actually causes the canvas widget to execute onDraw twice (just from console.logging within onDraw). Is this intentional? Or is there some other magic going on? It's not necessarily an issue for me, but just curious if it's on purpose or not.

It's a bug, thanks for the report (fixed in sources).

1 Like