This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==== UnityCallbackCheatSheetMonoBehaviour.cs ==== | |
// | |
// Use this to determine what order the editor makes callbacks. | |
// | |
// Extra useful note: Use `UnityEditor.SessionState.SetString` and the other type variants to save a value for only the | |
// current editor session. The value will be erased after exiting. | |
// | |
// Below is the order I found during execution in the editor. Process was I would open the editor, enter play mode, | |
// then exit play mode. | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.api.OpenMaya as om | |
if om.MGlobal.isZAxisUp(): | |
om.MGlobal.setYAxisUp() | |
else: | |
om.MGlobal.setZAxisUp() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Orient to Movement Direction - Rotation Script Controller | |
-- What it does: | |
-- - Orients a target object to a source object's movement direction and blends rotation between the source object's rotation and its | |
-- movement direction. | |
-- To use: | |
-- - Create the source object that you will animate position and rotation. | |
-- - Add some keyframes of the source object moving in different directions. | |
-- - Create the target object that will be controlled by the script. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unity | |
*.cginc text | |
*.cs diff=csharp text | |
*.shader text | |
# Unity YAML | |
*.anim merge=unityyamlmerge eol=lf | |
*.asset merge=unityyamlmerge eol=lf | |
*.controller merge=unityyamlmerge eol=lf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
Create MaxScript .api file for use with the automcomplete feature of the MaxScript editor. | |
Originally Created by: | |
James Haywood | |
http://apps.jhaywood.com/blog/ | |
Updated by Matt Ostgard | |
***/ | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import os | |
import json | |
import math | |
from collections import OrderedDict | |
def multiply_rgb_by_alpha_and_set_alpha_to_1(hex_color): | |
# Turn hex to float values | |
rgba = [] |