mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
allows arbitrary material name string replacement, rather than forcing folks to start with base. ie: an entry of skin = "blue; area=fire"; would replace base_area_grid with blue_fire_grid as the used material
This commit is contained in:
parent
6479c7592a
commit
9e435a3f34
1 changed files with 3 additions and 6 deletions
|
|
@ -307,12 +307,9 @@ void TSShapeInstance::reSkin( String newBaseName, String oldBaseName )
|
||||||
{
|
{
|
||||||
// Try changing base
|
// Try changing base
|
||||||
const String &pName = materialNames[i];
|
const String &pName = materialNames[i];
|
||||||
if ( pName.compare( oldBaseName, oldBaseNameLength, String::NoCase ) == 0 )
|
String newName( pName );
|
||||||
{
|
newName.replace( oldBaseName, newBaseName );
|
||||||
String newName( pName );
|
pMatList->renameMaterial( i, newName );
|
||||||
newName.replace( 0, oldBaseNameLength, newBaseName );
|
|
||||||
pMatList->renameMaterial( i, newName );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the material instances
|
// Initialize the material instances
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue