user8064: 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?

user6391: 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()))

where 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.

8064: <p>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?</p>
 6391: <p>There's not a built in method for that, but this Python expression will return the highest keyframe in an animation curve:</p>

<pre><code>max((key.y for key in nuke.toNode('Blur1')['size'].animation(0).keys()))
</code></pre>

<p>where <code>Blur1</code> is the node and <code>size</code> is the knob.</p>

<p>Paste this into your expression editor, being sure to select the <strong>Py</strong> toggle.</p>

<hr>

<p>This won't interpolate or extrapolate keys. It only iterates over every keyframe.</p>

<p>No guarantees on the speed of this either. It might bog down the node if you have a keyframe on every frame or something.</p>
