MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / reSkin

Method reSkin

Engine/source/T3D/shapeBase.cpp:3515–3541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3513//----------------------------------------------------------------------------
3514
3515void ShapeBase::reSkin()
3516{
3517 if ( isGhost() && mShapeInstance && mSkinNameHandle.isValidString() )
3518 {
3519 Vector<String> skins;
3520 String(mSkinNameHandle.getString()).split( ";", skins );
3521
3522 for (S32 i = 0; i < skins.size(); i++)
3523 {
3524 String oldSkin( mAppliedSkinName.c_str() );
3525 String newSkin( skins[i] );
3526
3527 // Check if the skin handle contains an explicit "old" base string. This
3528 // allows all models to support skinning, even if they don't follow the
3529 // "base_xxx" material naming convention.
3530 S32 split = newSkin.find( '=' ); // "old=new" format skin?
3531 if ( split != String::NPos )
3532 {
3533 oldSkin = newSkin.substr( 0, split );
3534 newSkin = newSkin.erase( 0, split+1 );
3535 }
3536
3537 mShapeInstance->reSkin( newSkin, oldSkin );
3538 mAppliedSkinName = newSkin;
3539 }
3540 }
3541}
3542
3543void ShapeBase::setCurrentWaterObject( WaterObject *obj )
3544{

Callers

nothing calls this directly

Calls 9

isValidStringMethod · 0.80
splitMethod · 0.80
substrMethod · 0.80
StringClass · 0.50
getStringMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45
findMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected