Hi lovely Tweak people,
I've seen a separate question on here that asks about having a HUD element that shows extra metadata, and this is something that I've done before, but this time I'm trying to access metadata from inside an overlay function.
(I have no idea how the formatting is going to work here... I've indented code, which might look okay...)
In my widget, I could access the attributes using:
State state = data();
let pinfo = state.pixelInfo,
iname = if (pinfo neq nil && !pinfo.empty())
sourceAttrs = sourceAttributes(iname);
However, if I try to do the same code in my overlay function, it raises an exception:
ERROR: caught exception from myburn.main (void; int w, int h, int tx, int ty, int tw, int th, bool stereo, bool rightEye, int frame, [string] argv)
Which, from commenting lines out, seems to be coming from this line: let pinfo = state.pixelInfo
I'm guessing that data() is returning NULL in this case.