Skip to content

Instantly share code, notes, and snippets.

@jedypod
jedypod / HexGenerator.nk
Last active December 17, 2018 12:37
Generates a Hex Pattern
set cut_paste_input [stack 0]
version 5.2 v1
Group {
inputs 0
name HexGenerator
selected true
xpos -50
ypos -482
addUserKnob {20 HexGenerator}
addUserKnob {41 format T HexGenCalc.format}
@jedypod
jedypod / reformat_paint.py
Created November 18, 2015 17:40
Scales all strokes in a rotopaint node by a specified scale: expects a layer full of strokes that have all been scaled by the specified amount from a center of 0,0
## Adjust size of all brush stokes in a layer
## Expects a single layer in the rotopaint node containing strokes that want to be scaled.
## This script scales the brushsize and source transform by the scale value
_SCALE_ = 1.53706293
rn = nuke.selectedNode()
cKnob = rn["curves"]
rootLayer = cKnob.rootLayer
@jedypod
jedypod / daily_still_photos.py
Created December 20, 2018 04:13
Develop and process still photos using OpenImageIO
import OpenImageIO as oiio
from OpenImageIO import ImageInput, ImageOutput
from OpenImageIO import ImageBuf, ImageSpec, ImageBufAlgo
import os, sys
import shlex, subprocess
import glob
#--------------------------------------------
@jedypod
jedypod / nuke_python_recipes.py
Last active June 18, 2019 21:12
Nuke Python Recipes
import nuke, math
def get_closest_node(node):
# Return the closest node to node
distances = {}
for n in nuke.allNodes():
if n.name() == node.name():
continue
distance = math.sqrt(
math.pow( (node.xpos() - n.xpos()), 2 ) + math.pow( (node.ypos() - n.ypos()), 2 )
)
@jedypod
jedypod / FLog2Lin.nk
Last active June 23, 2019 02:39
Fuji F-Log Colorspace Transformations
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name FLog2Lin
label "\[value operation]"
selected true
xpos -40
ypos -952
addUserKnob {20 FLog2Lin}
addUserKnob {4 operation M {log2lin lin2log}}
@jedypod
jedypod / Dockerfile
Last active September 2, 2019 02:51
Compile Blender 2.8 on Centos 7.6 using Docker
FROM centos
LABEL maintainer="mattias.ohlsson@inprose.com"
ENV HOME /root
WORKDIR $HOME
RUN yum update -y && yum clean all
# Install packages
@jedypod
jedypod / _Dockerfile
Last active September 22, 2019 02:49
Compile Krita 4.2.5 on Centos 7.6 using Docker
# Dockerfile
FROM centos
LABEL maintainer="JED"
ENV HOME /root
WORKDIR $HOME
RUN yum update -y && yum clean all
@jedypod
jedypod / ColorTracker.nk
Last active October 19, 2019 05:07
ColorTracker: A wrapper for the CurveTool, which allows you to analyze color change over time of an input, and apply that data to a grade in matchmove or stabilize mode around a specified reference frame. Because I am bad at remembering math.
Group {
name ColorTracker
addUserKnob {20 ColorTracker}
addUserKnob {26 instructions_text l <b>Instructions: T "1). Stabilize your plate around the area you want to track\n2). Crop your plate to just the area you want to analyze\n4). Press Track Color to analyze the footage\n5). Create a matchmove or stabilize grade, and specify your reference frame\n6). You can scale the curve around a specified pivot value on the grade node \n using the color_pivot and color_mult knobs in the ColorTrack tab"}
addUserKnob {26 ""}
addUserKnob {26 label_trackcolor l "<b>Track Color" T " "}
addUserKnob {41 track_color l "Track Color" t "This button will track the color change over the specified framerange and put the data into the intensitydata knob." T CurveTool.go}
addUserKnob {41 intensitydata T CurveTool.intensitydata}
addUserKnob {26 ""}
addUserKnob {26 label_apply_color_track l "<b>Apply Track" T " "}

Compile GafferCycles with OIDN

Trying to compile the [https://github.com/boberfly/GafferCycles/tree/oidn](oidn branch of gafferCycles) to get OpenImageDenoise working in Gaffer.

# Compile with vfx reference platform docker
docker run -it --mount type=bind,source=/pod/sw/compile/gaffercycles,target=/root --mount type=bind,source=/opt,target=/root/opt --entrypoint /bin/bash gaffercycles-1

# Set up env
export GAFFER_ROOT=~/opt/gaffer/gaffer
@jedypod
jedypod / nuke_viewer_shortcut_intercept.py
Created May 11, 2020 03:26 — forked from dbr/nuke_viewer_shortcut_intercept.py
Test of finding Nuke's viewer widget, and intercepting the hardwired "c" shortcut and rewiring it to view the RGB channel
"""Test of finding Nuke's viewer widget, and intercepting the hardwired "c" shortcut and rewiring it to view the RGB channel
"""
from PySide import QtGui, QtCore
def findviewer():
stack = QtGui.QApplication.topLevelWidgets()
viewers = []
while stack: