MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / addCmd_setSequenceBlend

Method addCmd_setSequenceBlend

Engine/source/ts/tsShapeConstruct.cpp:2751–2784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2749}
2750
2751bool 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
2786bool TSShapeConstructor::ChangeSet::addCmd_renameSequence(const TSShapeConstructor::ChangeSet::Command& newCmd)
2787{

Callers

nothing calls this directly

Calls 5

namesEqualFunction · 0.85
dAtobFunction · 0.85
dAtoiFunction · 0.85
sizeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected