Skip to content

Instantly share code, notes, and snippets.

View renaudll's full-sized avatar

Renaud Lessard Larouche renaudll

  • Québec, Canada
View GitHub Profile
"""
Align joints to view. Vendored from omtk.
This will align joints using the camera direction as the up-vector (Z axis).
This will preserve the start and end position and project everything to a 2D plane.
Usage:
1) Select multiple joints
2) Align the camera
3) Run the script
"""
Remove the "Bebe Magic (tm)" reference edits from selected meshes.
"""
from contextlib import contextmanager
from maya import cmds
def _get_selected_meshes(sel):
meshes = []
for obj in sel:
"""
Connect meshes deformation from a rig to one or multiple destination rigs.
The deformation is adapted to be relative from the rig root. <3
Usage:
- Select one or multiple geometry or (group containing geometry) from a SOURCE rig.
- Add to the selection one or multiple root ctrl from DESTINATION(s) rigs.
- Run the tool
"""
@renaudll
renaudll / find_duplicates.py
Last active September 7, 2020 19:45
Find duplicates
"""
Scan a provided directory and report any duplicate files.
Made quickly for a friend.
"""
import os
import logging
import itertools
import hashlib
import argparse
import multiprocessing
"""
Warning: The mirror functionnality of OMTK is in alpha stage. Use it at your own risk!
Usage example:
# Step 1: Add attributes
for obj in pymel.selected():
add_mirror_attr(obj)
# Step 2: Manually configure attributes
@renaudll
renaudll / init.py
Created January 29, 2016 02:21
Initialize shotgun from Maya
import tank
from maya import cmds
path = cmds.file(q=True, sn=True)
tk = tank.tank_from_path(path)
ctx = tk.context_from_path(path)
tank.platform.start_engine('tk-maya', tk, ctx)
(package-initialize)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(elpy-enable)
;;
;; Package auto-install
;;
(defvar local-packages '(projectile auto-complete epc jedi))
(defun uninstalled-packages (packages)
@renaudll
renaudll / gist:c2f8d79d27687655de35
Last active May 9, 2024 17:19
Arch Linux Installation
#############################################################
# Installation (custom setup)
# https://wiki.archlinux.org/index.php/beginners'_guide
#
# For Rasberri Pi Installation:
# http://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2
#############################################################
# Reconfigure partition table & format
sgdisk --zap-all /dev/sda
[global]
netbios name = nas
security = user
encrypt passwords = yes
map to guest = bad user
unix password sync = yes
[media]
comment = Music/Videos/etc
path = /mnt/nas
from maya import cmds
sFile = cmds.file(q=True, sceneName=True)
cmds.file(sFile, open=True, force=True)