| 507 | } |
| 508 | |
| 509 | void shiftTexture(const Vector2& shift) |
| 510 | { |
| 511 | std::string command("shiftTexture: "); |
| 512 | command += "s=" + string::to_string(shift[0]) + ", t=" + string::to_string(shift[1]); |
| 513 | |
| 514 | UndoableCommand undo(command); |
| 515 | |
| 516 | GlobalSelectionSystem().foreachFace([&] (IFace& face) |
| 517 | { |
| 518 | face.shiftTexdefByPixels(static_cast<float>(shift[0]), static_cast<float>(shift[1])); |
| 519 | }); |
| 520 | GlobalSelectionSystem().foreachPatch([&] (IPatch& patch) |
| 521 | { |
| 522 | patch.translateTexture(static_cast<float>(shift[0]), static_cast<float>(shift[1])); |
| 523 | }); |
| 524 | |
| 525 | SceneChangeNotify(); |
| 526 | // Update the Texture Tools |
| 527 | radiant::TextureChangedMessage::Send(); |
| 528 | } |
| 529 | |
| 530 | void scaleTexture(const Vector2& scale) |
| 531 | { |
no test coverage detected