/*
*/
import artofillusion.animation.*;
//***************************
// --- methods---
//***************************
// Generating a reorganizing the joint list so,
// that parents appear before children.
Joint[] AddJointWithChildren(Joint joint, Joint[] oldList)
{
int i; // This is neceassary in the script
newList = new Joint[oldList.length+1];
System.arraycopy(oldList, 0, newList, 0, oldList.length);
newList[oldList.length]=joint;
for (i=0;i -1)
if (mirroringList[parentIndexList[i]] == true)
toMirror = true;
if (dir == 0)
if (Math.abs(position.x-mOff) > tol)
toMirror = true;
if (dir == 1)
if (Math.abs(position.y-mOff) > tol)
toMirror = true;
if (dir == 2)
if (Math.abs(position.z-mOff) > tol)
toMirror = true;
mirroringList[i] = toMirror;
}
return mirroringList;
}
// This is what actually does the work.
void MirrorJoints
( Joint[] jointsInOrder, boolean[] mirroringList, int[] parentIndexList,
Joint[] parentList, int dir, double tol, double mOff, Skeleton skeleton)
{
for (i=0;i
m = skeleton.getJoints().length - origJoints.length;
print ("Mirrored "+m+" joints of "+origJoints.length+".");
print ("Joint count of " + selInfo.getName() +" is now "+skeleton.getJoints().length+".");
// <--------
return;