Skip to content

Instantly share code, notes, and snippets.

View mottosso's full-sized avatar

Marcus Ottosson mottosso

View GitHub Profile
@borgfriend
borgfriend / maya2017install.sh
Last active April 13, 2024 13:34
Maya 2017 Installation on Ubuntu 16.04
#!/bin/bash
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
echo Please run this script using sudo
echo Just type “sudo !!”
exit
fi
#Check for 64-bit arch
if [uname -m != x86_64]; then
import maya.OpenMaya as om
import maya.cmds as mc
import uuid
def get_name(node):
"""Get the long name from the MObject where appropriate"""
if node.hasFn(om.MFn.kDagNode):
return om.MFnDagNode(node).fullPathName()
else:
return om.MFnDependencyNode(node).name()
@mottosso
mottosso / quickstart.py
Last active August 29, 2015 14:26
Learn Pyblish By Example - Quickstart
"""Full Example
From http://forums.pyblish.com/t/learning-pyblish-by-example/108/3
Usage:
Copy and run this entire file in your Maya Script Editor
"""
import os
@mottosso
mottosso / 0_README.md
Last active August 29, 2015 14:24
That's the gist of it

That's the gist of it

Since be 0.3.0, you can now use gists for presets and register them with [be-presets][1] to have them appear in the [online database][2] of presets.

untitled

This is great for configurations that you wish to remain small and that may not need all of the flexibility that a full GitHub repository offers, such as pull-request, wiki and issue tracking. Gists also have support for comments, which is something unique. This means you can share a project configuration, and start a conversation about it, in context to the physical files that make up that configuration.

But perhaps the greatest thing about gists is the ability to glance over multiple files at once. Each file is laid out next to each other, alphabetically, top-to-bottom. Since be presets are so small, you can typically fit an entire configuration on a page without scrolling. Win!

@gre
gre / easing.js
Last active April 30, 2024 04:58
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {