This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nuke | |
import os | |
def parse_nuke_layout(filepath): | |
""" | |
Parses the XML window layout from the header of a Nuke (.nk) script file. | |
Args: | |
filepath (str): The full path to the .nk script file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set cut_paste_input [stack 0] | |
version 14.1 v5 | |
push $cut_paste_input | |
Expression { | |
channel0 {rgba.red -rgba.green rgba.blue} | |
name Expression5 | |
selected true | |
xpos 2349 | |
ypos -55 | |
addUserKnob {20 User} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyWidget::MyWidget(MyKnob* knob) : _knob(knob), _value(knob->_data), _dragging(false) | |
{ | |
setFixedSize(60, 30); | |
_switchRect = rect(); | |
_knob->addCallback(WidgetCallback, this); | |
} | |
MyWidget::~MyWidget() | |
{ | |
if (_knob) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PLUGIN_NAME=VenetianBlinds | |
export OS=Linux | |
declare -A NUKE | |
NUKE[10_0]=/usr/local/Nuke10.0v6/include | |
NUKE[10_5]=/usr/local/Nuke10.5v6/include | |
NUKE[11_0]=/usr/local/Nuke11.0v4/include | |
NUKE[11_1]=/usr/local/Nuke11.1v2/include | |
NUKE[11_2]=/usr/local/Nuke11.2v5/include |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set cut_paste_input [stack 0] | |
version 13.0 v1 | |
Group { | |
inputs 0 | |
name Minecraft_Import | |
label orca.nbt | |
selected true | |
xpos 103 | |
ypos -89 | |
addUserKnob {20 nbtfile l NBTFile} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Create A pixellated Orca, similar to the scupture in Vancouver """ | |
import nuke | |
blocks = [('a', 0), ('b', .1), ('c', .5), ('d', 1)] | |
colors = {k: nuke.nodes.Constant(color='{0} {0} {0} 1'.format(c)) for k,c in blocks} | |
scene = nuke.nodes.Scene() | |
scene.setSelected(True) | |
index = x = y = z = c = m = 0 | |
data = '9y9y3yaz9y9y3yaa9z9z4zxz9y9y3yaaz9y9y3y3az9y9y3y3a8z9y9y5y7az9y9y6y8az9y9y7yaabdd3az'\ | |
'9y9y9y5daaz9y9y9yybc3da8zxzz9y9y3y3az9y9y3y3az9y9y3y3az9y9y5ya3z9y9yyy7az9y9yyy9az9y9yyy9aaaz9y'\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Group { | |
name CelestialCam | |
knobChanged "if 'celestial_cam' in globals(): celestial_cam.celestial_cam_callback()" | |
selected true | |
xpos 6036 | |
ypos 400 | |
addUserKnob {20 User l "Celestial Camera"} | |
addUserKnob {52 map l "" t "Widget refreshes when putting mouse over it. It can occasionally result in a little jump when the input camera has been modified, as the map will not update until hovered." -STARTLINE T "celestial_cam.LatLongPicker(nuke.thisNode()) if 'celestial_cam' in globals() else type('Dummy', (), \{'makeUI': classmethod(lambda self: None)\})"} | |
addUserKnob {7 lat l Latitude t "Latitude coordinate of camera location on Earth" R -90 90} | |
addUserKnob {7 long l Longitude t "Longitude coordinate of camera location on Earth" R -180 180} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: http://www.nukepedia.com/python/nodegraph/ku_labler | |
# Tweaks to make it work with multiline by Erwan Leroy | |
import nuke | |
from Qt import QtWidgets, QtGui, QtCore | |
class Core_SetLabel(QtWidgets.QDialog): | |
def __init__(self): | |
super(Core_SetLabel,self).__init__() |
NewerOlder