Exemplo n.º 1
0
 private void hideBones() {
   for (String timelineName : _clip.hideTimelineNameMap) {
     Bone bone = _armature.getBone(timelineName);
     if (bone != null) {
       bone.hideSlots();
     }
   }
   for (String slotTimelineName : _clip.hideSlotTimelineNameMap) {
     Slot slot = _armature.getSlot(slotTimelineName);
     if (slot != null) {
       slot.resetToOrigin();
     }
   }
 }
Exemplo n.º 2
0
  /**
   * Removes a bone which was supposed be animated.
   *
   * @param boneName Bone's timeline name.
   * @param ifInvolveChildBones If involved child bone's timeline.
   */
  public AnimationState removeBoneMask(String boneName, boolean ifInvolveChildBones) {
    removeBoneFromBoneMask(boneName);

    if (ifInvolveChildBones) {
      Bone currentBone = _armature.getBone(boneName);
      if (currentBone != null) {
        ArrayList<Bone> boneList = _armature.getBones(false);
        int i = boneList.size();
        while (i-- > 0) {
          Bone tempBone = boneList.get(i);
          if (currentBone.contains(tempBone)) {
            removeBoneFromBoneMask(tempBone.name);
          }
        }
      }
    }
    updateTimelineStates();

    return this;
  }