Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / utf.py
Created April 24, 2018 10:21
Use TX files
import pymel.core as pc
import os
for node in pc.ls(type="file"):
path = node.fileTextureName.get()
tx_path = os.path.splitext(path)[0] + ".tx"
if os.path.exists(tx_path):
node.fileTextureName.set(tx_path)
@tokejepsen
tokejepsen / nlv.py
Last active May 17, 2018 10:02
Nuke Latest Version
"""
Select read nodes to find latest version.
Initial search range for versions are 50 versions up.
"""
import nuke
import nukescripts
nodes = nuke.selectedNodes()
@tokejepsen
tokejepsen / post_script_ngskintools_import.py
Created May 10, 2019 09:27
mGear Post Script ngSkinTools Import
import os
import pymel.core as pc
import ngSkinTools.importExport
import mgear
basename = os.path.basename(pc.sceneName())
filename = os.path.splitext(basename)[0]
directory = os.path.dirname(pc.sceneName())
@tokejepsen
tokejepsen / post_script_studiolibray_import.py
Created May 10, 2019 09:29
mGear Post Script StudioLibrary Import
import os
import pymel.core as pc
from studiolibrarymaya import animitem
basename = os.path.basename(pc.sceneName())
filename = os.path.splitext(basename)[0]
directory = os.path.dirname(pc.sceneName())
@tokejepsen
tokejepsen / post_script_eye_rigger_import.py
Created May 10, 2019 09:31
mGear Post Script Eyes Import
import os
import pymel.core as pc
import mgear.rigbits.facial_rigger.eye_rigger
basename = os.path.basename(pc.sceneName())
filename = os.path.splitext(basename)[0]
directory = os.path.dirname(pc.sceneName())
@tokejepsen
tokejepsen / post_script_deltamush_import.py
Created May 10, 2019 09:33
mGear Post Script DeltaMush Import
import os
import pymel.core
basename = os.path.basename(pymel.core.sceneName())
filename = os.path.splitext(basename)[0]
directory = os.path.dirname(pymel.core.sceneName())
# Find *.deltamush folder starting with same name as current file