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

Method addCmd_setNodeParent

Engine/source/ts/tsShapeConstruct.cpp:2463–2489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2461// NODE COMMANDS
2462
2463bool TSShapeConstructor::ChangeSet::addCmd_setNodeParent(const TSShapeConstructor::ChangeSet::Command& newCmd)
2464{
2465 // No dependencies, replace the parent argument for any previous addNode or
2466 // setNodeParent.
2467
2468 for (S32 index = mCommands.size() - 1; index >= 0; index--)
2469 {
2470 Command& cmd = mCommands[index];
2471 switch (cmd.type)
2472 {
2473 case CmdAddNode:
2474 case CmdSetNodeParent:
2475 if (namesEqual(cmd.argv[0], newCmd.argv[0]))
2476 {
2477 cmd.argv[1] = newCmd.argv[1]; // Replace parent argument
2478 return false;
2479 }
2480 break;
2481
2482 default:
2483 break;
2484 }
2485 }
2486
2487 return true;
2488
2489}
2490
2491bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform(const TSShapeConstructor::ChangeSet::Command& newCmd)
2492{

Callers

nothing calls this directly

Calls 2

namesEqualFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected