Ejemplo n.º 1
0
        /** @return May be null. */
        public IkConstraint FindIkConstraint(String ikConstraintName)
        {
            if (ikConstraintName == null)
            {
                throw new ArgumentNullException("ikConstraintName cannot be null.");
            }
            List <IkConstraint> ikConstraints = this.ikConstraints;

            for (int i = 0, n = ikConstraints.Count; i < n; i++)
            {
                IkConstraint ikConstraint = ikConstraints[i];
                if (ikConstraint.data.name == ikConstraintName)
                {
                    return(ikConstraint);
                }
            }
            return(null);
        }
Ejemplo n.º 2
0
        public void SetBonesToSetupPose()
        {
            List <Bone> bones = this.bones;

            for (int i = 0, n = bones.Count; i < n; i++)
            {
                bones[i].SetToSetupPose();
            }

            List <IkConstraint> ikConstraints = this.ikConstraints;

            for (int i = 0, n = ikConstraints.Count; i < n; i++)
            {
                IkConstraint ikConstraint = ikConstraints[i];
                ikConstraint.bendDirection = ikConstraint.data.bendDirection;
                ikConstraint.mix           = ikConstraint.data.mix;
            }
        }