FrameHold default to current frame

Quick one this:

Framehold

Bearing in mind that 99% of the time when we create a FrameHold node we want to hold the current frame, usually as part of a frozen camera projection. Yet FrameHold defaults to frame 0. Yes, it only takes a second to peer down at the timeline and write in the frame you want, but your time is precious so why put up with that?

You can always write the word ‘frame’ into any value and it will turn into the current frame number, but that’s still 5 key taps that you, a person with your talents, shouldn’t have to be making.

If you have access to your menu.py, simply add this line to make every FrameHold you make automatically use the current frame when it’s created (should be all one line):

nuke.menu(‘Nodes’).addCommand( “Time/FrameHold”, “nuke.createNode(‘FrameHold’)[‘first_frame’].setValue( nuke.frame() )”, icon=’FrameHold.png’)

It’s nothing complicated, just overrides the normal FrameHold menu item, creates a FrameHold in the same way, but uses the nuke.frame() function to grab the current frame number at the time of creation.