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

Method addCmd_setSequenceCyclic

Engine/source/ts/tsShapeConstruct.cpp:2718–2749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2716}
2717
2718bool TSShapeConstructor::ChangeSet::addCmd_setSequenceCyclic(const TSShapeConstructor::ChangeSet::Command& newCmd)
2719{
2720 // Replace any previous setSequenceCyclic command, but stop if the
2721 // sequence is used as a source for addSequence (since the priority is
2722 // copied).
2723
2724 for (S32 index = mCommands.size() - 1; index >= 0; index--)
2725 {
2726 Command& cmd = mCommands[index];
2727 switch (cmd.type)
2728 {
2729 case CmdSetSequenceCyclic:
2730 if (namesEqual(cmd.argv[0], newCmd.argv[0]) &&
2731 dAtob(cmd.argv[1]) != dAtob(newCmd.argv[1]))
2732 {
2733 mCommands.erase(index); // ignore both setCyclic commands (1 undoes the other)
2734 return false;
2735 }
2736 break;
2737
2738 case CmdAddSequence:
2739 if (namesEqual(cmd.argv[1], newCmd.argv[0]))
2740 return true; // Sequence is used as source => cannot go back further
2741 break;
2742
2743 default:
2744 break;
2745 }
2746 }
2747
2748 return true;
2749}
2750
2751bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend(const TSShapeConstructor::ChangeSet::Command& newCmd)
2752{

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected