Skip to content

Instantly share code, notes, and snippets.

@tokejepsen
tokejepsen / nastb.py
Created February 6, 2018 14:00
NukeStudio all source to bin
sequence = hiero.ui.activeSequence()
bin = None
for item in sequence.project().clipsBin().bins():
if item.name() == "Conform":
bin = item
if bin is None:
bin = hiero.core.Bin("Conform")
sequence.project().clipsBin().addItem(bin)
@tokejepsen
tokejepsen / nracis.py
Last active February 6, 2018 12:39
NukeStudio replace all clips in sequence
sequence = hiero.ui.activeSequence()
bin = None
for item in sequence.project().clipsBin().bins():
if item.name() == "Conform":
bin = item
if bin is None:
bin = hiero.core.Bin("Conform")
@tokejepsen
tokejepsen / nsbt.py
Last active September 17, 2020 08:46
NukeStudio select by tag
import hiero
seq = hiero.ui.activeSequence()
tag_names = ["fluffy", "compositing"]
item_names = []
for video_track in seq.videoTracks():
for item in video_track.items():
@tokejepsen
tokejepsen / Dockerfile
Last active December 11, 2017 23:33
Dropbox Dockerfile
FROM ubuntu:latest
RUN apt-get -qq update
RUN apt-get install python wget -y
RUN cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
RUN wget -O dropbox.py https://www.dropbox.com/download?dl=packages/dropbox.py
VOLUME /root/Dropbox
VOLUME /root/.dropbox
@tokejepsen
tokejepsen / fbpe.py
Last active December 13, 2017 17:54
Flow Based Programming Experiments
"""
- Keyword arguments can be None, so need something more unique to compare
against.
- There is the possibility of cache the results of each component for quicker
evaluation.
"""
import inspect
import functools
from pyblish import api
@tokejepsen
tokejepsen / acp.py
Last active July 2, 2018 07:49
AfterEffects Python Communication
import os
import socket
import traceback
def send(cmd, port):
host = '127.0.0.1'
# we expect a result no matter if it errors, so we keep trying until we
@tokejepsen
tokejepsen / filelink-environment.yml
Last active August 1, 2017 14:09
filelink-environment
@tokejepsen
tokejepsen / dmud
Last active March 1, 2017 23:10
Docker: Mount Users Directory
docker run -v /c/Users/admin/linux-env:/shared -it ubuntu /bin/bash
@tokejepsen
tokejepsen / hif.py
Last active January 25, 2017 10:24
Hiero: Import Ftrack
import hiero
import ftrack
shots_data = []
for seq in hiero.ui.activeSequence().project().sequences():
for vid in seq.videoTracks():
for item in vid.items():
for tag in item.tags():
data = tag.metadata().dict()
@tokejepsen
tokejepsen / hbit.txt
Created January 24, 2017 11:56
Hiero: Burn In Tags
[python {sorted(hiero.ui.activeSequence().trackItemAt(hiero.ui.currentViewer().time()).tags(), key=lambda item: item.name())}]