| 2489 | } |
| 2490 | |
| 2491 | bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform(const TSShapeConstructor::ChangeSet::Command& newCmd) |
| 2492 | { |
| 2493 | // No dependencies, replace the parent argument for any previous addNode or |
| 2494 | // setNodeParent. |
| 2495 | |
| 2496 | for (S32 index = mCommands.size() - 1; index >= 0; index--) |
| 2497 | { |
| 2498 | Command& cmd = mCommands[index]; |
| 2499 | switch (cmd.type) |
| 2500 | { |
| 2501 | case CmdAddNode: |
| 2502 | if (namesEqual(cmd.argv[0], newCmd.argv[0])) |
| 2503 | { |
| 2504 | cmd.argc = newCmd.argc + 1; // Replace transform argument |
| 2505 | cmd.argv[2] = newCmd.argv[1]; |
| 2506 | cmd.argv[3] = newCmd.argv[2]; |
| 2507 | return false; |
| 2508 | } |
| 2509 | break; |
| 2510 | |
| 2511 | case CmdSetNodeTransform: |
| 2512 | if (namesEqual(cmd.argv[0], newCmd.argv[0])) |
| 2513 | { |
| 2514 | cmd = newCmd; // Collapse successive set transform commands |
| 2515 | return false; |
| 2516 | } |
| 2517 | break; |
| 2518 | |
| 2519 | default: |
| 2520 | break; |
| 2521 | } |
| 2522 | } |
| 2523 | |
| 2524 | return true; |
| 2525 | } |
| 2526 | |
| 2527 | bool TSShapeConstructor::ChangeSet::addCmd_renameNode(const TSShapeConstructor::ChangeSet::Command& newCmd) |
| 2528 | { |
nothing calls this directly
no test coverage detected