int findBoneIndex(String boneName) { final List<Bone> bones = this.bones; final int n = bones.length; for (int i = 0; i < n; i++) { if (bones[i].data.name == boneName) return i; } return -1; }