OldRange = (OldMax - OldMin)
NewRange = (NewMax - NewMin)
NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################### | |
# File name: edl_write # | |
# Author: Mel Massadian # | |
# Submission: 12/12/17 # | |
#################################### | |
import os | |
import sys | |
from timecode import Timecode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NORMALIZE in VEX for Houdini | |
// Normalize input mesh (resize it to 1 unit) and centers it. | |
//INIT | |
vector min, max; | |
getbbox(min, max); | |
vector center = (min+max)/2; | |
vector size = set(max.x - min.x,max.y -min.y,max.z - min.z); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UPGRADED TO SWIFT 3 | |
// fn_lister.swift | |
// MTB_Kit | |
// | |
// Created by Mel Massadian on 04/10/16. | |
// Copyright © 2016 Mel Massadian. All rights reserved. | |
// | |
import Cocoa | |
import Foundation | |
import AppKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://libbits.wordpress.com/2011/04/09/get-total-rsync-progress-using-python/ | |
import subprocess | |
import re | |
import sys | |
print('Dry run:') | |
cmd = 'rsync -az --stats --dry-run ' + sys.argv[1] + ' ' + sys.argv[2] | |
proc = subprocess.Popen(cmd, | |
shell=True, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""From the seemingly undocumented IRIDAS .look format to .csp | |
""" | |
import re | |
import os | |
import sys | |
import struct | |
import binascii | |
import xml.etree.ElementTree as ET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import difflib | |
import nuke | |
import nukescripts | |
class KnobsPanel(nukescripts.PythonPanel): | |
def __init__(self, knobs): | |
nukescripts.PythonPanel.__init__(self, 'KnobsPanel') |