copySkinnable method

void copySkinnable(
  1. ActorSkinnable node,
  2. ActorArtboard resetArtboard
)

Implementation

void copySkinnable(ActorSkinnable node, ActorArtboard resetArtboard) {
  if (node._connectedBones != null) {
    _connectedBones = List<SkinnedBone>(node._connectedBones.length);
    for (int i = 0; i < node._connectedBones.length; i++) {
      SkinnedBone from = node._connectedBones[i];
      SkinnedBone bc = SkinnedBone();
      bc.boneIdx = from.boneIdx;
      Mat2D.copy(bc.bind, from.bind);
      Mat2D.copy(bc.inverseBind, from.inverseBind);
      _connectedBones[i] = bc;
    }
  }
}