| 649 | } |
| 650 | |
| 651 | void brushSetDetailFlag(const cmd::ArgumentList& args) |
| 652 | { |
| 653 | if (args.size() != 1) |
| 654 | { |
| 655 | rError() << "Usage: BrushSetDetailFlag [detail|structural]" << std::endl; |
| 656 | return; |
| 657 | } |
| 658 | |
| 659 | // First argument contains the number of sides |
| 660 | std::string arg = string::to_lower_copy(args[0].getString()); |
| 661 | |
| 662 | if (arg == "detail") |
| 663 | { |
| 664 | UndoableCommand undo("BrushMakeDetail"); |
| 665 | |
| 666 | GlobalSelectionSystem().foreachBrush([&] (Brush& brush) |
| 667 | { |
| 668 | brush.setDetailFlag(IBrush::Detail); |
| 669 | }); |
| 670 | } |
| 671 | else if (arg == "structural") |
| 672 | { |
| 673 | UndoableCommand undo("BrushMakeStructural"); |
| 674 | |
| 675 | GlobalSelectionSystem().foreachBrush([&] (Brush& brush) |
| 676 | { |
| 677 | brush.setDetailFlag(IBrush::Structural); |
| 678 | }); |
| 679 | } |
| 680 | else |
| 681 | { |
| 682 | rError() << "Usage: BrushMakeDetail [detail|structural]" << std::endl; |
| 683 | } |
| 684 | } |
| 685 | |
| 686 | } // namespace algorithm |
| 687 |
nothing calls this directly
no test coverage detected