| 647 | } |
| 648 | |
| 649 | void Humanoid::setHandFrameOverrides(ToolHand hand, StringView back, StringView front) { |
| 650 | auto& handInfo = const_cast<HandDrawingInfo&>(getHand(hand)); |
| 651 | // some users stick directives in these?? better make sure they don't break with custom clothing |
| 652 | size_t backEnd = back.utf8().find('?'); |
| 653 | size_t frontEnd = front.utf8().find('?'); |
| 654 | Directives backDirectives = backEnd == NPos ? Directives() : Directives( back.utf8().substr( backEnd)); |
| 655 | Directives frontDirectives = frontEnd == NPos ? Directives() : Directives(front.utf8().substr(frontEnd)); |
| 656 | if ( backEnd != NPos) back = back.utf8().substr(0, backEnd); |
| 657 | if (frontEnd != NPos) front = front.utf8().substr(0, frontEnd); |
| 658 | handInfo. backFrame = ! back.empty() ? std::move( back) : "rotation"; |
| 659 | handInfo.frontFrame = !front.empty() ? std::move(front) : "rotation"; |
| 660 | handInfo. backDirectives = ! backDirectives.empty() ? std::move( backDirectives) : Directives(); |
| 661 | handInfo.frontDirectives = !frontDirectives.empty() ? std::move(frontDirectives) : Directives(); |
| 662 | } |
| 663 | |
| 664 | void Humanoid::setHandDrawables(ToolHand hand, List<Drawable> drawables) { |
| 665 | const_cast<HandDrawingInfo&>(getHand(hand)).itemDrawables = std::move(drawables); |
no test coverage detected