I want to feed a custom made NoOp node with a floating point slider with the maximum value of an animation curve from another node. What would be the right expression to do this?
There's not a built in method for that, but this Python expression will return the highest keyframe in an animation curve:
max((key.y for key in nuke.toNode('Blur1')['size'].animation(0).keys()))
Blur1 is the node and
size is the knob.
Paste this into your expression editor, being sure to select the Py toggle.
This won't interpolate or extrapolate keys. It only iterates over every keyframe.
No guarantees on the speed of this either. It might bog down the node if you have a keyframe on every frame or something.