| 2749 | } |
| 2750 | |
| 2751 | bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend(const TSShapeConstructor::ChangeSet::Command& newCmd) |
| 2752 | { |
| 2753 | // Replace any previous setSequenceBlend command, but stop if the |
| 2754 | // sequence is used as a source for addSequence (since the priority is |
| 2755 | // copied). |
| 2756 | |
| 2757 | for (S32 index = mCommands.size() - 1; index >= 0; index--) |
| 2758 | { |
| 2759 | Command& cmd = mCommands[index]; |
| 2760 | switch (cmd.type) |
| 2761 | { |
| 2762 | case CmdSetSequenceBlend: |
| 2763 | if (namesEqual(cmd.argv[0], newCmd.argv[0]) && |
| 2764 | dAtob(cmd.argv[1]) != dAtob(newCmd.argv[1]) && |
| 2765 | namesEqual(cmd.argv[2], newCmd.argv[2]) && |
| 2766 | dAtoi(cmd.argv[3]) == dAtoi(newCmd.argv[3])) |
| 2767 | { |
| 2768 | mCommands.erase(index); // Ignore both setBlend commands (1 undoes the other) |
| 2769 | return false; |
| 2770 | } |
| 2771 | break; |
| 2772 | |
| 2773 | case CmdAddSequence: |
| 2774 | if (namesEqual(cmd.argv[1], newCmd.argv[0])) |
| 2775 | return true; // Sequence is used as source => cannot go back further |
| 2776 | break; |
| 2777 | |
| 2778 | default: |
| 2779 | break; |
| 2780 | } |
| 2781 | } |
| 2782 | |
| 2783 | return true; |
| 2784 | } |
| 2785 | |
| 2786 | bool TSShapeConstructor::ChangeSet::addCmd_renameSequence(const TSShapeConstructor::ChangeSet::Command& newCmd) |
| 2787 | { |
nothing calls this directly
no test coverage detected