Skip to content

Instantly share code, notes, and snippets.

@benmorgantd
benmorgantd / bm_axisDisplay.py
Last active August 12, 2024 07:41
Maya script that forces the Local Rotation Axis display on or off for all joints/transforms or the selected joints/transforms.
import maya.cmds as cmds
# bm_axisDisplay
# Forces the Local Rotation Axis display on or off for all joints or for the selected joints or transforms
def setAxisDisplay(display=False, allObj=False):
# if no joints are selected, do it for all the joints in the scene
# if allObj flag is True then this will toggle the axis display for all objects in the scene, not just joints.
if not allObj:
if len(cmds.ls(sl=1, type="joint")) == 0:
@davidlatwe
davidlatwe / renderSetup_util.py
Last active June 1, 2023 10:12
Query renderSetup overrided attribute value without switching layer
import re
import itertools
from maya import cmds
from maya.app.renderSetup.model import selector as rs_selector
from maya.app.renderSetup.model import renderSettings as rs_render_settings
if float(cmds.about(version=True)) >= 2020.0:
_attr_highest_col = "containerHighest"
"""
A simple utility module for moving skinned joints.
"""
import math
import pymel.core as pmc
def reset_bind_matrix(joint):
"""
@jedypod
jedypod / BalanceGrade.nk
Last active January 7, 2025 01:32
BalanceGrade - A Nuke tool to neutralize and balance the color of multiple input plates. Can be used with the CalibrateMacbeth or mmColorTarget toolsets to calibrate gamut as well.
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name BalanceGrade
tile_color 0x6c9de1ff
addUserKnob {20 BalanceGrade}
addUserKnob {26 ColorMatrix_label l "@b;ColorMatrix" T " "}
addUserKnob {41 matrix T ColorMatrix.matrix}
addUserKnob {22 reset_mtx l Reset T "nuke.thisNode()\['matrix'].setValue(\[1,0,0,0,1,0,0,0,1])" +STARTLINE}
addUserKnob {26 ""}