MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / brushSetDetailFlag

Function brushSetDetailFlag

radiantcore/selection/algorithm/Primitives.cpp:651–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649}
650
651void 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

Callers

nothing calls this directly

Calls 6

rErrorFunction · 0.85
to_lower_copyFunction · 0.85
foreachBrushMethod · 0.80
sizeMethod · 0.45
getStringMethod · 0.45
setDetailFlagMethod · 0.45

Tested by

no test coverage detected