holdFrames v1.2


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Frank Rueter
Website: www.ohufx.com
spawn FrameHold to extract still frames
Requirements:
6.0, 6.1 or later
Linux, Mac, Windows
31 Aug 2010
158

just removed the last line which was a debug left over


some updates as per Chris' comments:

  •  using an increment in the frame range is now supported (example: 1-100x5)
  • adde "import nuke" statement
  • fixed example in description

holdFrames will extract still frames from a selected node based on it's inherent frame range.

example entry for menu.py:

1
2
3
4
import holdFrames
 
toolbar = nuke.toolbar('Nodes')
toolbar.addCommand('Time/Hold Frames', 'holdFrames.holdFrames( nuke.selectedNode(), holdRange="all" )')

 

 holdFrames_01

 

when run with holdRange="all" (like in the above example), each frame in the node's frame range will be extracted by a FrameHold node (you can run this on any node, not just Reads).

holdFrames_02

You can also customise the behaviour by using a custom frame range like this:

1
holdFrames.holdFrames( nuke.selectedNode(), holdRange='2-5' )

 

 

 or invoke a frame range dialog like this:

 

1
holdFrames.holdFrames( nuke.selectedNode(), holdRange='ask' )

(actually, any given range that can't be interpreted will invoke the frame range dialog)

 

holdFrames_05holdFrames_04

Please login in order to download these files.

Comments   

 
# chris menz 2010-08-29 01:16
very useful for a recent project of mine, thanks!
might be cool to have an option for the stepping (like hold every 10th frame within the range).

two small code things i noticed:
- had to add "import nuke" at the beginning of the .py file
- OhuNodeOps.hold Frames( nuke.selectedNo de(), holdRange='ask' ) should probably ready holdFrames.hold Frames( nuke.selectedNo de(), holdRange='ask' ) in the description above.
++ chris
 
 
# Frank Rueter 2010-08-29 16:03
thanks Chris. I've addressed those issues and also added support for custom increments (i.e. "1-100x5")
 
 
# djati waskito 2010-08-31 06:34
good job Frank n Chris
 
 
# djati waskito 2010-08-31 06:44
hey Frank after i downloaded n give myself tried it didnt work. my nuke said "---------------------------
Nuke
---------------------------
C:/Program Files/Nuke6.0v7 /plugins/menu.p y : error interpreting this plugin
---------------------------
OK Hide Details...
---------------------------

weirdo ?
 
 
# chris menz 2010-08-31 07:17
hey djati,

i think it's because of a white space problem.
i mailed frank about it but in the meantime try adding 4 spaces at the beginning of line 28 (last line).
that did the trick for me.
++ chris
 
 
# djati waskito 2010-08-31 08:02
thanx Chris
 
 
# djati waskito 2010-08-31 08:33
can u gimme specifically--d etails ? sorry to bothered u and made u in difficult situation. Im new on the nuke's script

thanx Chris
 
 
# chris menz 2010-08-31 10:15
hiya,

no problem, but i'm not sure how to be more specific...
you open the .py file in a text editor, go to the end, look for line 27/28 which look like this:

27: return newNodes
28:holdFrames( nuke.selectedNo de(), 'ask' )

then change it to this
27: return newNodes
28: holdFrames( nuke.selectedNo de(), 'ask' )

(that's 4 spaces in the beginning of line 28 in case it gets lost on the formatting here)
if that throws you off or still doesn't work, i'm sure frank will fix the issue in the next days.
++ chris
 
 
# chris menz 2010-08-31 10:19
doh, of course the code got stripped. i'll try once more with code/pre tags, but basically you just want line 27 and 28 to line up:

Code:27: return newNodes <br />28:holdFrames( nuke.selectedNo de(), 'ask' ) <br /><br />then change it to this <br />27: return newNodes <br />28: holdFrames( nuke.selectedNo de(), 'ask' )

27: return newNodes
28:holdFrames( nuke.selectedNo de(), 'ask' )

then change it to this
27: return newNodes
28: holdFrames( nuke.selectedNo de(), 'ask' )
 
 
# chris menz 2010-08-31 10:21
ok, doesn't work neither with square bracket code tag nor with pre html tag.

frank, might be good to allow code in the comments too (maybe there already is a way?)
feel free to clean up the mess i made above ;-)
++ chris
 
 
# Frank Rueter 2010-08-31 16:54
sorry guys. the last line should removed all together. It's a left over from my debugging. I've updated the file now, so just re-download and let me know if there are still any problems.
 

You have no rights to post comments

We have 3951 guests and 113 members online