Nuke Preferences Manager

🦑 Get the Python module on GitLab Edit: April 2 2022 : Update v1.1.1 released In Nuke 12.2v5 - 13.1v1 the PreferencesManager added an extra TAB_KNOB to work around a Nuke bug that was hiding the last tab in the preferences’ side bar. This is fixed in Nuke 13.1v2+ so the PreferencesManager v1.1.1 removes this extra TAB_KNOB so it doesn’t clutter the interface. Edit April 5 2021 : Update v1.1.0 released This new release makes the Preferences Manager Nuke13 (Python3) compatible 🎉 ...

April 3, 2022

Let it snow

🦑 Get in on GitLab Sprinkle some winter mood into Your PySide GUIs with this widget: When creating VFX pipeline tools, whose main purpose it is to take the annoying part out of all the repetitive and tedious work, it’s nice to add some small “easter eggs”. If you write pipeline tools (or other Qt for Python / PySide based tools) feel free to use this little widget to decorate your GUI with some totally unnecessary but fun snowflakes. ...

November 28, 2021

Neat Photo Import

🦑 Find it on GitLab here Not wanting to open Lightroom, Darktable or other photo library apps to simply import/copy photos from my camera’s memory card, I wrote a script to fetch photos’ date-taken time stamp and copy them into a date-labelled folder structure: photoName.cr2 → YYYY/MM-DD → 2020/10-01/photoName.cr2 This admittedly simple task ended up also helping with re-organizing messy photo folders and turned out to be an interesting journey through the exiftool docs, running Python subprocesses and dealing with character encodings. ...

November 9, 2021

Reconnect Nuke Nodes

🦑 Get it on GitLab Edit: April 5 2021: v1.1.0 released Makes reconnectNodes Nuke13 (Python3) compatible and fixes a bug 🎉 Actually it’s been a while since I’ve created this tool, but after re-opening it the other day to do some bug fixing, I thought I might as well post it here, too. The concept is simple: When you paste recently copied nodes, reconnect disconnected inputs to their original parent nodes. This is how it looks in action: ...

April 5, 2021

Dodge Button

I made a stupid thing. But it was fun and I learned some stuff about QPropertyAnimations along the way. Here’s the code import sys from random import randint try: from PySide import QtCore, QtGui, QtGui as QtWidgets except: from PySide2 import QtCore, QtGui, QtWidgets class DodgeButton(QtWidgets.QPushButton): def __init__(self, parent=None): super(DodgeButton, self).__init__(parent=parent) # PROPERTIES self.origSize = [self.size().width(), self.size().height()] self.aniSpeed = 120 self.aniPosition = QtCore.QPropertyAnimation(self, b"pos") self.aniPosition.setDuration(self.aniSpeed) self.aniScale = QtCore.QPropertyAnimation(self, b"size") self.aniScale.setDuration(self.aniSpeed) # EVENTS self.clicked.connect(self.win) # INIT xPos = parent.width()/2-self.width()/2 yPos = parent.height()/2-self.height()/2 self.move(xPos, yPos) def win(self): print("ALRIGHTY!") def enterEvent(self, event): self.randomScale() self.randomMove() def randomMove(self): """ move to a random position """ randX = randint(0+self.width(), self.parent().width()-self.width()) randY = randint(0+self.height(), self.parent().height()-self.height()) # Move self.aniPosition.setStartValue(self.pos()) self.aniPosition.setEndValue(QtCore.QPoint(randX, randY)) self.aniPosition.start() def randomScale(self): """ scale to random size """ randMult = float(randint(50,200))/100.0 # Scale self.aniScale.setStartValue(self.size()) newSize = scalePropo([self.origSize[0], self.origSize[1]], self.origSize[0]*randMult) sizeX = newSize[0] sizeY = newSize[1] self.aniScale.setEndValue(QtCore.QSize(sizeX, sizeY)) self.aniScale.start() class MainWindow(QtWidgets.QDialog): def __init__(self, buttonName="Analyze", parent=None): super(MainWindow, self).__init__(parent) layout = QtWidgets.QVBoxLayout() self.setLayout(layout) self.setFixedSize(500, 500) # INIT self.button = DodgeButton(self) self.button.setText(buttonName) def scalePropo(oldSize=None,newWidth=None): ''' Scales an input size proportionally to the new desired width. :param oldsize : : The current size [x,y] :param newsize : : The new desired width ''' oldWidth = float(oldSize[0]) oldHeight = float(oldSize[1]) newHeight = (oldHeight/oldWidth)*float(newWidth) newSize = [newWidth,newHeight] return newSize def setup(): app = QtWidgets.QApplication(sys.argv) win1 = MainWindow("Analyze") win2 = MainWindow("Are you sure?") win3 = MainWindow("Are you really sure?") win1.button.clicked.connect(win2.exec_) win2.button.clicked.connect(win3.exec_) win1.exec_() # app.exec_() sys.exit(0) if __name__ == '__main__': setup()

June 12, 2018

neatlog: simple, colorful python logging

🦑 Get it on GitHub | 🏷️ latest I got tired of digging through piles of print statements to find a bug or formatting messages to the console so they are semi-readable. The python logging module fixed part of the problem, but quickly I also got tired of setting up handlers, formatters and didn’t want 20 lines of code at the top of every script just to be able to log. So I created neatlog - a small Python module to create readable logs, print them to the console in colors and even save them to a file ...

August 7, 2017

The Automated VFX Pipeline

Introduction In the course of the last year I’ve been a part of producing Visual Effects for two feature-length films with each around 100-200 VFX shots as a visual effects artist, supervisor and pipeline TD. To begin with we only had a small amount of ‘automated’ pipeline stuff, so almost everything was written from scratch. To make everyone’s day, including my own, way more fun and productive I set out to write a bunch of scripts and tools to make the repetitive and annoying tasks disappear beneath user interfaces. The following is a presentation of the tools I’ve developed and some background info and about how they work and were made. ...

January 8, 2017

Nuke Studio Comp Cleaner

🐙 Get the script on GitHub The past weeks I’ve been working on a python script to make working with ‘special comps’ generated by Nuke Studio less of a pain. When I set up comps for a project, I usually import an EDL from edit into Nuke Studio, relink the clips, rename them and then generate comps with ‘Create Special Comp’. That way I’m sure that the plates in the comp are aligned correctly in time and that the write node’s path is set correctly. This saves a huge amount of time for the artists that are going to work on the show. ...

July 29, 2016

Delete Nuke Group Viewers

Sometimes when Nuke’s caching gets super slow it might be caused by a sneaky Viewer node hiding somewhere inside a Group, slowing everything down. This script quickly gets rid of them and only leaves those in the “main” Node Graph. Get it from my 🦑 GitHub

September 5, 2015