PostageStamp Copy/Paste Fix v1.1
This location is for Registered Users Only.
Perhaps you need to login or register.
6.3, 7.0 or later
Linux, Mac, Windows


This simple Nuke script was written in Python to solve the small issue of PostageStamp copy pasting. It forces PostageStamps nodes to connect to the input of the the one copied upon pasting. Also works on multiple PostageStamps and Groups of nodes, as long as all the postage stamps are connected to the same root.
It was really written because we tend to use a lot of postage stamps for linking but could easily be adapted to any other node you wish to do this with.
You can run this by droping the script in your .nuke folder or anywhere else Nuke's Pathing looks. And putting something like the below lines in Nuke’s menu.py file.
#PostageStamp Copy Paste
import poststampCopyPaste
menubar.addMenu( '&Edit' ).addCommand( 'Copy', poststampCopyPaste.copyHijack, 'Ctrl+C', icon='')
menubar.addMenu( '&Edit' ).addCommand( 'Paste', poststampCopyPaste.pasteHijack, 'Ctrl+V')
v1.1 - Fixed bug that would cause postage stamps to not connect to their proper inputs when copied with said input.
Comments
-Chris
Thanks again for the great little script.
- Sebastian
Unfortunately this solution only supports a single PostageStamp at a time, since if you copy / paste more than one that are connected to different inputs, the result will all end up connected to the same node.
I might take what you've done and try to fix this and add cut / paste support if I have some spare time.
Cheers!
It overrides the cut/copy/paste functionality to handle postageStamps. It overcomes the problem of tracking what node each postageStamp is linked to by creating a knob on the node that contains that information. When one or multiple postageStamps are pasted, the script knows what node it should be connected to.
I also put in a helper function to create postageStamp nodes that contain a python knob to connect the input, and a label that displays the connected topnode's file knob or label knob or node-name.
Hope it's useful!
https://gist.github.com/jedypod/29187fa8c82bbbf4bf5e
https://github.com/jedypod/nuke-config/blob/master/ToolSets/Other/Pointer.nk
'NoneType' object has no attribute 'setInput'
I would use other solution such as Stamps, but The Foundry decided to limit the amount of code in Nuke Indie so after creating several links the tool doesn't work any more :/
RSS feed for comments to this post