Skip to content

Instantly share code, notes, and snippets.

@tokejepsen
tokejepsen / lbh.py
Last active September 11, 2020 17:09
Luminance Batch HDR
"""
python C:\Users\admin\Desktop\luminance_batch_hdr.py "C:\Program Files\Luminance HDR\v.2.6.0\luminance-hdr-cli.exe" C:\Users\admin\Desktop\sorted 13
"""
import os
import sys
import subprocess
def is_whole(n):
return n % 1 == 0
@tokejepsen
tokejepsen / nrr.py
Last active September 10, 2020 19:12
Nuke Recursive Read
import os
import clique
def recursive_read():
path = nuke.getClipname("Choose Folder", multiple=False)
collection_names = {}
@tokejepsen
tokejepsen / otio_to_ffmpeg.py
Last active November 24, 2020 08:48
OTIO to FFMPEG
import subprocess
import sys
import os
import json
import shutil
import requests
import opentimelineio as otio
@tokejepsen
tokejepsen / nukestudio_frame_exporter.py
Last active February 9, 2024 16:43
NukeStudio Frame Exporter
"""
Place in [NUKE_PATH]/Python/StartupUI
"""
import os
from PySide2 import QtCore, QtWidgets
import hiero.core.nuke as nuke
import hiero.core.nuke.Node
@tokejepsen
tokejepsen / ear_dwaa_compression.py
Last active October 29, 2019 09:44
EXR DWAA compression
import os
import sys
import subprocess
def get_size(start_path):
total_size = 0
for dirpath, dirnames, filenames in os.walk(start_path):
for f in filenames:
fp = os.path.join(dirpath, f)
@tokejepsen
tokejepsen / hold_frame_analyzer.py
Last active October 5, 2021 15:25
Hold Frame Analyzer
"""
Select the node to analyze for held frames.
Outputs a FrameHold node with animation synced to the held frames.
"incremental" > If True only increment held values by 1. If False held values are the frames.
"operation" > choice between "Auto Crop" and "Avg Intensities". Different footage can require different operations. If one operation misses a frame movement, then try the other.
"""
import nuke
@tokejepsen
tokejepsen / ftrack_check_resolution_action.py
Last active December 2, 2019 11:21
Ftrack: Check Resolution Action
import subprocess
import logging
import sys
import argparse
import webbrowser
import traceback
import json
import ftrack_api
@tokejepsen
tokejepsen / mirror_meshes.py
Last active September 17, 2019 13:10
Mirror Meshes
"""
Select all meshes that needs to be mirrored.
Script produces a mirror locator with a plane for visualizing.
"""
import pymel.core as pm
selection = pm.ls(selection=True)
@tokejepsen
tokejepsen / maya_frustum_cutter.py
Last active November 14, 2019 09:56
Maya Frustum Cutter
"""
Select the camera you want to cut from, then the geometry you want
to be cut.
"""
import maya.cmds as cmds
import pymel.core as pm
def cut_to_frustum(camera, geometry):
# Gather relevant camera attributes.
@tokejepsen
tokejepsen / google_drive_duplicates.py
Last active January 21, 2021 09:35
Google Drive Duplicates
import os
import re
import sys
import shutil
def get_size(start_path):
total_size = 0
for dirpath, dirnames, filenames in os.walk(start_path):
for f in filenames: