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
# Credit to Ryan Porter (yantor3d) | |
from maya import cmds | |
for jnt in cmds.ls(sl=True, type="joint"): | |
matrixPlugs = cmds.listConnections(jnt + ".worldMatrix", type="skinCluster", p=True) or [] | |
for mp in matrixPlugs: | |
bindPreMatrixPlug = mp.replace('matrix', 'bindPreMatrix') | |
if cmds.listConnections(bindPreMatrixPlug, s=True, d=False): |
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 FabricEngine.Core | |
import json | |
# import FabricEngine.Core.CAPI as capi | |
client = FabricEngine.Core.createClient({'guarded': True}) | |
client.loadExtension('Math') | |
client.loadExtension('Kraken') | |
registeredTypes = client.RT.types |
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 pymel.core as pm | |
main_window = pm.ui.Window(pm.MelGlobals.get('gMainWindow')) | |
width = pm.window(main_window, query=True, width=True) | |
print width |
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
Show hidden characters
{ | |
"cmd": ["D:/fabric/FabricEngine-2.2.0-Windows-x86_64/bin/kl.exe", "--loadexts", "$file"], | |
"env": { | |
"PATH": "D:/fabric/FabricEngine-2.2.0-Windows-x86_64/bin", | |
"FABRIC_DIR": "D:/fabric/FabricEngine-2.2.0-Windows-x86_64", | |
"FABRIC_EXTS_PATH": "D:/fabric/FabricEngine-2.2.0-Windows-x86_64/Exts;", | |
"FABRIC_DFG_PATH": "D:/fabric/FabricEngine-2.2.0-Windows-x86_64/Presets/DFG;" | |
}, | |
"selector": "source.kl", | |
"file_regex": "(?:]|:|^) ?([A-Za-z]:?[^:\\]]*\\.kl):(\\d+):(\\d+): (?:error:|warning:) (.+)$" |
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
// Calculate the twist blend with bias | |
Scalar bias = 0.5; | |
Integer divisions = 5; | |
Scalar fraction = Scalar(i) / Scalar(divisions - 1); | |
Scalar biasBlend = fraction / ((((1.0 / bias) - 2.0) * (1.0 - fraction)) + 1.0); | |
Scalar blend = Math_linearInterpolate(0.0, 1.0, biasBlend); |
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 FabricEngine.Core as fabric | |
client = fabric.createClient() | |
client.loadExtension("Math") | |
mat44 = client.RT.types.Mat44() | |
print mat44.getTypeName().getSimpleType() |
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 FabricEngine.Core as fabric | |
client = fabric.createClient() | |
client.loadExtension("Math") | |
matrixA = client.RT.types.Mat44() | |
matrixB = client.RT.types.Mat44() | |
matrixC = client.RT.types.Mat44() | |
matrixD = client.RT.types.Mat44() |
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
from PySide import QtCore, QtGui, QtOpenGL | |
class SliderWithValue(QtGui.QSlider): | |
def __init__(self, parent=None): | |
super(SliderWithValue, self).__init__(parent) | |
self.stylesheet = """ |
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
# Baking point positions to an ICE attribute for local caching. | |
# Eric Thivierge | |
from win32com.client import Dispatch | |
from win32com.client import constants | |
si = Application | |
log = LogMessage | |
sel = si.Selection |
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 win32com.client | |
from win32com.client import constants | |
from win32com.client import Dispatch as disp | |
from xml.etree import ElementTree as ET | |
from xml.etree.ElementTree import tostring | |
import base64 | |
import traceback | |
#-------------------------- Import Python base modules. |