diff --git a/spine-cocos2dx/src/spine/SkeletonRenderer.cpp b/spine-cocos2dx/src/spine/SkeletonRenderer.cpp index 292a16edc..7fba02ca1 100644 --- a/spine-cocos2dx/src/spine/SkeletonRenderer.cpp +++ b/spine-cocos2dx/src/spine/SkeletonRenderer.cpp @@ -915,14 +915,18 @@ namespace { Attachment *attachment = slot.getAttachment(); if (!attachment || slotIsOutRange(slot, startSlotIndex, endSlotIndex) || - !slot.getBone().isActive() || - slot.getColor().a == 0) + !slot.getBone().isActive()) return true; - if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) { + const auto& attachmentRTTI = attachment->getRTTI(); + if (attachmentRTTI.isExactly(ClippingAttachment::rtti)) + return false; + if (slot.getColor().a == 0) + return true; + if (attachmentRTTI.isExactly(RegionAttachment::rtti)) { if (static_cast(attachment)->getColor().a == 0) return true; } - else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) { + else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) { if (static_cast(attachment)->getColor().a == 0) return true; }