Skip to content

Instantly share code, notes, and snippets.

View timlehr's full-sized avatar
🍜
Dreaming of ramen

Tim Lehr timlehr

🍜
Dreaming of ramen
View GitHub Profile
@timlehr
timlehr / FFmpeg Cheat Sheet.md
Created April 14, 2023 23:10 — forked from dexeonify/FFmpeg Cheat Sheet.md
Some basic and frequently-used FFmpeg command lines compiled into one long gist.
@timlehr
timlehr / README.md
Created November 8, 2018 17:00 — forked from mottosso/README.md
Parallel Evaluation in Maya 2018+

An example of parallel evaluation in Maya 2018+

Scenes

  1. Independent hierarchies, with parent constraint

Usage

Files prefixed scene* generate nodes suitable for parallelism, profile* contain ways to measure performance. Each snippet of code is meant to be copy/pasted into the Script Editor and run.

@timlehr
timlehr / viewport_to_qimage.py
Created August 10, 2018 22:22
Capture Maya viewport to QImage
import ctypes
import maya.OpenMaya as om
import maya.OpenMayaUI as omui
from PySide2 import QtCore, QtGui, QtWidgets
# Capture viewport to MImage
view = omui.M3dView.active3dView()
mIm = om.MImage()
@timlehr
timlehr / .py
Created May 31, 2017 17:24
Photo mosaic script (Linux, Python, Imagick)
import os, sys, math, subprocess, shlex
from shutil import copy2
if __name__ == '__main__':
walkdir = "/mnt/tlehr/projects/btb_mosaic/photos/" # folder which contains all photos
destdir = "/mnt/tlehr/projects/btb_mosaic/collection/" # folder to which the specific photos to use will be copied
destfile = "/mnt/tlehr/projects/btb_mosaic/mosaic.jpg" # filepath to the resulting image