| 481 | } |
| 482 | |
| 483 | void naturalTexture(const cmd::ArgumentList& args) |
| 484 | { |
| 485 | UndoableCommand undo("naturalTexture"); |
| 486 | |
| 487 | // Construct the "naturally" scaled Texdef structure |
| 488 | ShiftScaleRotation shiftScaleRotation; |
| 489 | |
| 490 | float naturalScale = registry::getValue<float>("user/ui/textures/defaultTextureScale"); |
| 491 | |
| 492 | shiftScaleRotation.scale[0] = naturalScale; |
| 493 | shiftScaleRotation.scale[1] = naturalScale; |
| 494 | |
| 495 | // Patches |
| 496 | GlobalSelectionSystem().foreachPatch( |
| 497 | [] (IPatch& patch) { patch.scaleTextureNaturally(); } |
| 498 | ); |
| 499 | GlobalSelectionSystem().foreachFace( |
| 500 | [&] (IFace& face) { face.setShiftScaleRotation(shiftScaleRotation); } |
| 501 | ); |
| 502 | |
| 503 | SceneChangeNotify(); |
| 504 | |
| 505 | // Update the Texture Tools |
| 506 | radiant::TextureChangedMessage::Send(); |
| 507 | } |
| 508 | |
| 509 | void shiftTexture(const Vector2& shift) |
| 510 | { |
nothing calls this directly
no test coverage detected