Adds a filter for materials to never import when importing a shape

This commit is contained in:
Areloch 2019-02-23 22:04:17 -06:00
parent 775ca57047
commit a7a5463ad1
3 changed files with 81 additions and 16 deletions

View file

@ -144,6 +144,7 @@ TSShapeConstructor::TSShapeConstructor()
mOptions.neverImport = String(Con::getVariable("$TSShapeConstructor::neverImport"));
mOptions.alwaysImportMesh = "";
mOptions.neverImportMesh = String(Con::getVariable("$TSShapeConstructor::neverImportMesh"));
mOptions.neverImportMat = String(Con::getVariable("$TSShapeConstructor::neverImportMat"));
mOptions.ignoreNodeScale = false;
mOptions.adjustCenter = false;
mOptions.adjustFloor = false;
@ -266,6 +267,13 @@ void TSShapeConstructor::initPersistFields()
"not be imported (unless it matches the alwaysImportMesh list.\n"
"@see alwaysImportMesh" );
addField("neverImportMat", TypeRealString, Offset(mOptions.neverImportMat, TSShapeConstructor),
"TAB separated patterns of materials to ignore on loading. No effect for DTS files.\n"
"Torque allows unwanted materials in COLLADA (.dae) files to to be ignored "
"during import. This field contains a TAB separated list of patterns to "
"match material names. Any material that matches one of the patterns in the list will "
"not be imported");
addField( "ignoreNodeScale", TypeBool, Offset(mOptions.ignoreNodeScale, TSShapeConstructor),
"Ignore <scale> elements inside COLLADA <node>s. No effect for DTS files.\n"
"This field is a workaround for certain exporters that generate bad node "