| 641 | } |
| 642 | |
| 643 | void TSStatic::reSkin() |
| 644 | { |
| 645 | if (isGhost() && mShapeInstance) |
| 646 | { |
| 647 | if (mSkinNameHandle.isValidString()) |
| 648 | { |
| 649 | mShapeInstance->resetMaterialList(); |
| 650 | Vector<String> skins; |
| 651 | String(mSkinNameHandle.getString()).split(";", skins); |
| 652 | |
| 653 | for (S32 i = 0; i < skins.size(); i++) |
| 654 | { |
| 655 | String oldSkin(mAppliedSkinName.c_str()); |
| 656 | String newSkin(skins[i]); |
| 657 | |
| 658 | // Check if the skin handle contains an explicit "old" base string. This |
| 659 | // allows all models to support skinning, even if they don't follow the |
| 660 | // "base_xxx" material naming convention. |
| 661 | S32 split = newSkin.find('='); // "old=new" format skin? |
| 662 | if (split != String::NPos) |
| 663 | { |
| 664 | oldSkin = newSkin.substr(0, split); |
| 665 | newSkin = newSkin.erase(0, split + 1); |
| 666 | } |
| 667 | else |
| 668 | { |
| 669 | oldSkin = ""; |
| 670 | } |
| 671 | mShapeInstance->reSkin(newSkin, oldSkin); |
| 672 | mAppliedSkinName = newSkin; |
| 673 | } |
| 674 | } |
| 675 | else |
| 676 | { |
| 677 | mShapeInstance->reSkin("", mAppliedSkinName); |
| 678 | mAppliedSkinName = ""; |
| 679 | } |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | void TSStatic::processTick(const Move* move) |
| 684 | { |
nothing calls this directly
no test coverage detected