This file contains 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
'''File containing simple commands for switching between IK and FK and keeping the pose. | |
This file is used for demonstration purposes, to be followed along with in this blog post | |
http://bindpose.com/seamless-ik-fk-switch-maya-python/ | |
''' | |
import maya.cmds as mc | |
def ikFkSwitch_sameOrient(): |
This file contains 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.cmds as mc | |
def _null(*args): | |
pass | |
class _shelf(): | |
'''A simple class to build shelves in maya. Since the build method is empty, | |
it should be extended by the derived class to build the necessary shelf elements. |
This file contains 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
""" | |
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 |
This file contains 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 FBX_Scene | |
import FbxCommon | |
def clean_character_scene(fbx_filename): | |
""" | |
Clean up character fbx file | |
""" | |
# open the fbx scenes and get the scene nodes | |
fbx_file = FBX_Class(fbx_filename) | |
if not fbx_file: |
This file contains 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/python | |
import glob | |
import os | |
import sys | |
from subprocess import Popen, PIPE | |
# Script that will compare screenshots to a set of previous screenshots | |
# first arg: full path to base screenshots | |
# second arg: full path to spoon output dir |
This file contains 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
package main | |
import ( | |
"image" | |
"image/color" | |
"image/png" | |
"math" | |
"os" | |
"strconv" | |
) |
This file contains 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
""" | |
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 |
This file contains 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
typeId | typeName | classification | attributeCount | |
---|---|---|---|---|
0x345dad01 | substance | texture/2d | 38L | |
0x346dad01 | substanceOutput | drawdb/shader/texture/2d/substanceOutput:texture/2d | 36L | |
0x41424141 | animBlendNodeAdditiveDA | animation | 12L | |
0x41424146 | animBlendNodeAdditiveF | animation | 12L | |
0x41424149 | animBlendNodeAdditiveI32 | animation | 12L | |
0x4142414c | animBlendNodeAdditiveDL | animation | 12L | |
0x41424153 | animBlendNodeAdditiveI16 | animation | 12L | |
0x4142424f | animBlendNodeBoolean | animation | 11L | |
0x41424641 | animBlendNodeAdditiveFA | animation | 12L |
This file contains 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
"""This is a first draft template that could be used to retrieve the edits on referenced nodes that define a look | |
Next step would be to filter the edits of interest, like shader assignments, sets they are added to, attributes that were added or changed in value. | |
Then we need to store these changes in a format that is artist-friendly and can be re-applied in another scene. | |
""" | |
import maya.cmds as mc | |
from collections import defaultdict |