diff --git a/spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp b/spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp index ad68c17a8..3d132dbc6 100644 --- a/spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp @@ -70,7 +70,7 @@ void AttachmentTimeline::apply(Skeleton &skeleton, float lastTime, float time, V Slot &slot = *slotP; if (direction == MixDirection_Out && blend == MixBlend_Setup) { attachmentName = &slot._data._attachmentName; - slot._attachment = attachmentName->length() == 0 ? NULL : skeleton.getAttachment(_slotIndex, *attachmentName); + slot.setAttachment(attachmentName->length() == 0 ? NULL : skeleton.getAttachment(_slotIndex, *attachmentName)); return; } @@ -78,8 +78,7 @@ void AttachmentTimeline::apply(Skeleton &skeleton, float lastTime, float time, V // Time is before first frame. if (blend == MixBlend_Setup || blend == MixBlend_First) { attachmentName = &slot._data._attachmentName; - slot._attachment = - attachmentName->length() == 0 ? NULL : skeleton.getAttachment(_slotIndex, *attachmentName); + slot.setAttachment(attachmentName->length() == 0 ? NULL : skeleton.getAttachment(_slotIndex, *attachmentName)); } return; } @@ -93,7 +92,7 @@ void AttachmentTimeline::apply(Skeleton &skeleton, float lastTime, float time, V } attachmentName = &_attachmentNames[frameIndex]; - slot._attachment = attachmentName->length() == 0 ? NULL : skeleton.getAttachment(_slotIndex, *attachmentName); + slot.setAttachment(attachmentName->length() == 0 ? NULL : skeleton.getAttachment(_slotIndex, *attachmentName)); } int AttachmentTimeline::getPropertyId() { diff --git a/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp b/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp index e13180ad7..37ca544f8 100644 --- a/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp @@ -69,7 +69,7 @@ void DeformTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vecto Slot *slotP = skeleton._slots[_slotIndex]; Slot &slot = *slotP; - Attachment *slotAttachment = slot._attachment; + Attachment *slotAttachment = slot.getAttachment(); if (slotAttachment == NULL || !slotAttachment->getRTTI().instanceOf(VertexAttachment::rtti)) { return; } diff --git a/spine-cpp/spine-cpp/src/spine/Skeleton.cpp b/spine-cpp/spine-cpp/src/spine/Skeleton.cpp index 9040e3ce1..33550e702 100644 --- a/spine-cpp/spine-cpp/src/spine/Skeleton.cpp +++ b/spine-cpp/spine-cpp/src/spine/Skeleton.cpp @@ -564,7 +564,7 @@ void Skeleton::sortPathConstraint(PathConstraint *constraint) { for (size_t ii = 0, nn = _data->_skins.size(); ii < nn; ii++) sortPathConstraintAttachment(_data->_skins[ii], slotIndex, slotBone); - Attachment *attachment = slot->_attachment; + Attachment *attachment = slot->getAttachment(); if (attachment != NULL && attachment->getRTTI().instanceOf(PathAttachment::rtti)) sortPathConstraintAttachment(attachment, slotBone); diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp index 5ba3ce130..5e9ed1585 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp @@ -57,7 +57,7 @@ void SkeletonBounds::update(Skeleton &skeleton, bool updateAabb) { for (size_t i = 0; i < slotCount; i++) { Slot *slot = slots[i]; - Attachment *attachment = slot->_attachment; + Attachment *attachment = slot->getAttachment(); if (attachment == NULL || !attachment->getRTTI().instanceOf(BoundingBoxAttachment::rtti)) { continue; }