ws Average 1.0 (2009)

Python, Tools

I used in this case the basic principles of nodal script to make the connections using Node “PlusMinusAverage” for calculating the average between the selected objects. To solve the system of wings that I need, solve in a efficient way.


Neste caso eu usei os princípios básicos de script nodal para fazer as conexões usando o Node “PlusMinusAverage” para calcular as médias entre os objetos selecionados. Resolveu para o sistema de penas que eu precisa, apesar de ter melhores formas de resolver usando Scripts.

I did for rigging feather wings. It works for others things too!

Something of the base of the code.

# Script: ws_Average
# Version: 1.0
# Author: Wesley Schneider
# Website:
# E-mail:
import maya.cmds as cmds
rotplus1=cmds.shadingNode ('plusMinusAverage',au=1)
transplus2=cmds.shadingNode ('plusMinusAverage',au=1)
scaleplus3=cmds.shadingNode ('plusMinusAverage',au=1)

cmds.setAttr (rotplus1+'.operation', 3);
cmds.setAttr (transplus2+'.operation', 3);
cmds.setAttr (scaleplus3+'.operation', 3);

cmds.connectAttr(s[0]+'.rotate',rotplus1+ '.input3D[0]',f=1 )
cmds.connectAttr(s[1]+'.rotate',rotplus1+ '.input3D[1]',f=1 )
cmds.connectAttr(rotplus1 + '.output3D', s[2]+'.rotate', f=1)

cmds.connectAttr(s[0]+'.translate',transplus2+ '.input3D[0]',f=1 )
cmds.connectAttr(s[1]+'.translate',transplus2+ '.input3D[1]',f=1 )
cmds.connectAttr(transplus2+ '.output3D', s[2]+'.translate', f=1)

cmds.connectAttr(s[0]+'.scale',scaleplus3+ '.input3D[0]',f=1 )
cmds.connectAttr(s[1]+'.scale',scaleplus3+ '.input3D[1]',f=1 )
cmds.connectAttr(scaleplus3+ '.output3D', s[2]+'.scale', f=1)