Skip to content

Instantly share code, notes, and snippets.

View OmniZ3D's full-sized avatar

Jason Barnidge OmniZ3D

View GitHub Profile
@Meatplowz
Meatplowz / performFileDropAction.mel
Last active May 20, 2024 07:41
Override the Maya Drag and Drop Behavior for File Open/Import
// Randall Hess randall.hess@gmail.com
// Instructions: Copy this file over your local maya version to override the default behavior
// Maya 2022 and Higher
// Additional: You can also build and load this as a module and not overwrite the local maya file.
// Location: C:\Program Files\Autodesk\MayaXX\scripts\others\performFileDropAction.mel
global proc int
performFileDropAction (string $theFile)
@chris-lesage
chris-lesage / check_max_influences.py
Created January 29, 2020 23:31
Check skinClusters for too many influences per vertex in Autodesk Maya.
import maya.OpenMaya as OpenMaya
import pymel.core as pm
import maya.OpenMayaAnim as OpenMayaAnim
import maya.cmds as cmds
import maya.mel as mel
class checkMaxSkinInfluences(object):
''' This script takes a mesh with a skinCluster and checks it for N skin weights.
If it has more than N, it selects the verts, so you can edit them.
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@hrldcpr
hrldcpr / tree.md
Last active May 1, 2024 00:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@Muream
Muream / bake_to_opm.py
Last active April 29, 2024 16:50
This script bakes the transformation of a node to its offset parent matrix which then acts as its rest matrix. Only works with maya 2020 and up.
import maya.api.OpenMaya as om
import maya.cmds as cmds
TRANSFORM_NODETYPES = ["transform", "joint"]
def has_non_default_locked_attributes(node):
locked_attributes = []
for attribute in ["translate", "rotate", "scale", "jointOrient"]:
default_value = 1 if attribute == "scale" else 0
for axis in "XYZ":
@Meatplowz
Meatplowz / FBX_Scene.py
Last active April 29, 2024 10:12
This is a wrapper FBX class useful in accessing and modifying the FBX Scene
"""
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@chris-lesage
chris-lesage / example_usage.py
Last active April 14, 2024 20:43
A script to pin an object to a NurbsSurface in Autodesk Maya
import pymel.core as pm
'''
Here are some examples of how to use the pin_to_surface.py script.
'''
# make a nurbsPlane
oNurbs = pm.nurbsPlane(n='nurbsPlane1')
# You can specify the nurbsSurface by string, PyNode transform or PyNode shape.
@jdkanani
jdkanani / notepad.html
Last active April 6, 2024 17:09 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@mrliptontea
mrliptontea / sublime-text-3-windows-shortcuts.md
Last active March 30, 2024 04:14 — forked from TheShrike/gist:6111200
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line