Skip to content

Instantly share code, notes, and snippets.

View steffanoRichi's full-sized avatar

Steffano Richi steffanoRichi

View GitHub Profile
import os
import maya.cmds as mc
import utilities.wrFunctions as wrFunc
from ngSkinTools2 import api, signal
def convert_v1_2_v2(transforms):
for transform in transforms:
shapes = wrFunc.getShape(transform)
"""
########################################################################################################################
AUTHOR:
Steffano Richi (steffano.richi@gmail.com)
https://encci20.blogspot.pe/
16.04.2023
DESCRIPTION:
Set Default Attr for float and integers
USAGE:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
########################################################################################################################
AUTHOR:
Steffano Richi (steffano.richi@gmail.com)
https://encci20.blogspot.pe/
16.01.2019
DESCRIPTION:
Snap IK//FK for SMAR Tools
"""
########################################################################################################################
AUTHOR:
Steffano Richi (steffano.richi@gmail.com)
https://encci20.blogspot.pe/
20.03.2018
DESCRIPTION:
Trasfer shader from previous file. Guided by vertex ID.
USAGE:
import maya.cmds as mc
import os
import json
from ngSkinTools.importExport import LayerData,JsonExporter,JsonImporter
#Func
def getCurrentRoot():
filepath = mc.file(q=True, sn=True)
filename = os.path.basename(filepath)
path = filepath.replace(filename,'')
"""
########################################################################################################################
AUTHOR:
Steffano Richi (steffano.richi@gmail.com)
https://encci20.blogspot.pe/
31.10.2017
DESCRIPTION:
Create cell shader in arnold 5, using the native nodes from it.
USAGE:
import maya.cmds as mc
def resetSkinCluster(skinClusterNode):
'''
Originaly created by Macaronikazoo - edited by Steffano
Splats the current pose of the skeleton into the skinCluster
The current pose is becomes the bindpose
'''
numInputs= len(mc.listConnections(skinClusterNode + '.matrix',destination=False))