Technical‎ > ‎Nuke‎ > ‎

Scripts

Here are few python scripts that i did for me.
They are already used in production in few company.


QuickView
menu.py:
from QuickView import *
quick = nuke.menu('Nuke')
quick.addCommand('Layout/-', '', '')
quick.addCommand('Layout/QuickView/Create Marker 0', 'quickViewMarker(0);', '')
quick.addCommand('Layout/QuickView/Create Marker 1', 'quickViewMarker(1);', '')
quick.addCommand('Layout/QuickView/Create Marker 2', 'quickViewMarker(2);', '')
quick.addCommand('Layout/QuickView/Create Marker 3', 'quickViewMarker(3);', '')
quick.addCommand('Layout/QuickView/Create Marker 4', 'quickViewMarker(4);', '')
quick.addCommand('Layout/QuickView/Create Marker 5', 'quickViewMarker(5);', '')
quick.addCommand('Layout/QuickView/Create Marker 6', 'quickViewMarker(6);', '')
quick.addCommand('Layout/QuickView/Create Marker 7', 'quickViewMarker(7);', '')
quick.addCommand('Layout/QuickView/Create Marker 8', 'quickViewMarker(8);', '')
quick.addCommand('Layout/QuickView/Create Marker 9', 'quickViewMarker(9);', '')

quick.addCommand('Layout/QuickView/-', '', '')
quick.addCommand('Layout/QuickView/Find Marker 0', 'quickViewShow(0);', '^0')
quick.addCommand('Layout/QuickView/Find Marker 1', 'quickViewShow(1);', '^1')
quick.addCommand('Layout/QuickView/Find Marker 2', 'quickViewShow(2);', '^2')
quick.addCommand('Layout/QuickView/Find Marker 3', 'quickViewShow(3);', '^3')
quick.addCommand('Layout/QuickView/Find Marker 4', 'quickViewShow(4);', '^4')
quick.addCommand('Layout/QuickView/Find Marker 5', 'quickViewShow(5);', '^5')
quick.addCommand('Layout/QuickView/Find Marker 6', 'quickViewShow(6);', '^6')
quick.addCommand('Layout/QuickView/Find Marker 7', 'quickViewShow(7);', '^7')
quick.addCommand('Layout/QuickView/Find Marker 8', 'quickViewShow(8);', '^8')
quick.addCommand('Layout/QuickView/Find Marker 9', 'quickViewShow(9);', '^9')

QuickView is a python script for Nuke that allow you to create visual marker in the nodes view. You can then position thoose marker wherever you want and recall them by shortcut.
By default, shortcut are Ctrl+number from numpad.
You can create until 10 marker from 0 to 9.
The QuickView menu is by default in the Menu/Layout/QuickView/
Download: QuickView.zip

Preset
menu.py:
from Preset import *
nukeMenu = nuke.menu("Nuke")
nukeMenu.addCommand('your directory/Preset/Create Preset', 'createPreset()', '')
nukeMenu.addCommand('
your directory/Preset/Apply Preset', 'doPreset()', '')
nukeMenu.addCommand('
your directory/Preset/Remove Preset', 'doRemovePreset()', '')

Preset as it talk allow you to record preset in the user directory and recall them by node's class.
This is very simple to implement in pipeline.
Deprecated at Nuke v 6.3.

DownloadPreset.zip

pasteMultiple
menu.py:
from pasteMultiple import *
m = menubar.addMenu("&Edit")
m.addCommand('&Paste', 'pasteMultiple()', '^v')

Paste multiple nodes.
When you copy a node or a group of nodes, you can after select few nodes and paste. Your group of nodes will be pasted under every selected nodes and keep the original selection.
This is usefull because it can replace the original Paste command without problemes.

DownloadpasteMultiple.zip





Comments