FrameHold with SetThisFrame Button v1.2

This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Harrison Ly
Sets current frame when created & button to set current frame.
6.0, 6.1, 6.2, 6.3 or later
15 May 2012

Whenever I use the FrameHold node I’m always setting the first frame value and I’m fed up with it!

So I hijacked the node and did this:
- set the current frame value when the node is called
- created a button to set a current frame on the timeline

It will save a few seconds each time you use it however it all adds up in the end. This also diminishes you entering the wrong frame number. We all have done that!


Please login in order to download these files.


0 # Victor Perez 2012-05-07 03:34
Thanks, very useful!
0 # Mitja Müller-Jend 2015-03-27 18:22
You could also simply type "frame" into the first_frame knob to set its value to the current framenumber.
-1 # Ian Blewitt 2015-07-09 19:34
Wow, awesome. Didn't know that!
+3 # Daniel Short 2016-12-08 00:15
You can also just type in "t". It's the same as "frame" but 5x faster. It's my favourite expression. ;-)
0 # Kalyan Biswas 2021-06-11 06:42
and also type "x" for the current frame number.
0 # Aaron Singer 2015-11-01 14:54
But that would be typing more characters in that field than simply typing in the actual frame.
Does anybody know how to set up the file to automatically make the frameHold node use the current frame when called up?
+2 # Frank Rueter 2015-11-01 21:54
You can add a callback to your like this:
def frameHoldCB():
nuke.addOnUserCreate(frameHoldCB, nodeClass='Fram eHold')

or in one line:
nuke.addOnUserCreate(lambda:nuke.thisNode()['first_frame'].setValue(nuke.frame()), nodeClass='Fram eHold')
+1 # Krista Rowland 2020-11-06 13:27
I optimized your code a little. I like to have shortcut keys so in mine, I enabled the user to create a FrameHold based on the current frame after hitting 'f' (the shortcut key) or via the Node Menu on the left side. If you add this line of code to your it will work on startup. 'Nodes' ).addCommand( 'Time/FrameHold ', lambda: nuke.createNode ( 'FrameHold', 'first_frame ' + str(nuke.frame( )) ), 'f')
0 # kiran nani 2023-03-15 09:51
We are using it in nuke 12, working good but it keeps adding "setThisFrame" tab on the FrameHold node. And also the frame value changing to current frame after saving and reopening the script.

You have no rights to post comments

We have 3855 guests and 102 members online