sortPathConstraint method

void sortPathConstraint(
  1. PathConstraint constraint
)
inherited

Implementation

void sortPathConstraint(PathConstraint constraint) {
  final Slot slot = constraint.target!;
  final int slotIndex = slot.data.index;
  final Bone slotBone = slot.bone;
  if (skin != null) sortPathConstraintAttachment(skin!, slotIndex, slotBone);
  if (data.defaultSkin != null && data.defaultSkin != skin) {
    sortPathConstraintAttachment(data.defaultSkin!, slotIndex, slotBone);
  }
  final int n = data.skins.length;
  for (int i = 0; i < n; i++) {
    sortPathConstraintAttachment(data.skins[i], slotIndex, slotBone);
  }

  final Attachment? attachment = slot.getAttachment();
  if (attachment is PathAttachment) {
    sortPathConstraintAttachmentWith(attachment, slotBone);
  }

  final List<Bone> constrained = constraint.bones;
  final int boneCount = constrained.length;
  for (int i = 0; i < boneCount; i++) {
    sortBone(constrained[i]);
  }

  _updateCache.add(constraint);

  for (int i = 0; i < boneCount; i++) {
    sortReset(constrained[i].children);
  }
  for (int i = 0; i < boneCount; i++) {
    constrained[i].sorted = true;
  }
}