| 3672 | //---------------------------------------------------------------------------- |
| 3673 | |
| 3674 | void ShapeBase::reSkin() |
| 3675 | { |
| 3676 | if (isGhost() && mShapeInstance) |
| 3677 | { |
| 3678 | if (mSkinNameHandle.isValidString()) |
| 3679 | { |
| 3680 | mShapeInstance->resetMaterialList(); |
| 3681 | Vector<String> skins; |
| 3682 | String(mSkinNameHandle.getString()).split(";", skins); |
| 3683 | |
| 3684 | for (S32 i = 0; i < skins.size(); i++) |
| 3685 | { |
| 3686 | String oldSkin(mAppliedSkinName.c_str()); |
| 3687 | String newSkin(skins[i]); |
| 3688 | |
| 3689 | // Check if the skin handle contains an explicit "old" base string. This |
| 3690 | // allows all models to support skinning, even if they don't follow the |
| 3691 | // "base_xxx" material naming convention. |
| 3692 | S32 split = newSkin.find('='); // "old=new" format skin? |
| 3693 | if (split != String::NPos) |
| 3694 | { |
| 3695 | oldSkin = newSkin.substr(0, split); |
| 3696 | newSkin = newSkin.erase(0, split + 1); |
| 3697 | } |
| 3698 | else |
| 3699 | { |
| 3700 | oldSkin = ""; |
| 3701 | } |
| 3702 | mShapeInstance->reSkin(newSkin, oldSkin); |
| 3703 | mAppliedSkinName = newSkin; |
| 3704 | } |
| 3705 | } |
| 3706 | else |
| 3707 | { |
| 3708 | mShapeInstance->reSkin("", mAppliedSkinName); |
| 3709 | mAppliedSkinName = ""; |
| 3710 | } |
| 3711 | } |
| 3712 | } |
| 3713 | |
| 3714 | void ShapeBase::setCurrentWaterObject( WaterObject *obj ) |
| 3715 | { |
nothing calls this directly
no test coverage detected