mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
Merge pull request #2328 from Areloch/neverImportMat
Adds a filter for materials to never import when importing a shape
This commit is contained in:
commit
4e9b9b4724
3 changed files with 81 additions and 16 deletions
|
|
@ -90,6 +90,7 @@ namespace ColladaUtils
|
|||
String neverImport; // List of node names (with wildcards) to ignore on loading
|
||||
String alwaysImportMesh; // List of mesh names (with wildcards) to import, even if in the neverImportMesh list
|
||||
String neverImportMesh; // List of mesh names (with wildcards) to ignore on loading
|
||||
String neverImportMat; // List of material names (with wildcards) to ignore on loading
|
||||
bool ignoreNodeScale; // Ignore <scale> elements in <node>s
|
||||
bool adjustCenter; // Translate model so origin is at the center
|
||||
bool adjustFloor; // Translate model so origin is at the bottom
|
||||
|
|
@ -109,9 +110,10 @@ namespace ColladaUtils
|
|||
singleDetailSize = 2;
|
||||
matNamePrefix = "";
|
||||
alwaysImport = "";
|
||||
neverImport = "";
|
||||
neverImport = String(Con::getVariable("$TSShapeConstructor::neverImport"));
|
||||
alwaysImportMesh = "";
|
||||
neverImportMesh = "";
|
||||
neverImportMesh = String(Con::getVariable("$TSShapeConstructor::neverImportMesh"));
|
||||
neverImportMat = String(Con::getVariable("$TSShapeConstructor::neverImportMat"));
|
||||
ignoreNodeScale = false;
|
||||
adjustCenter = false;
|
||||
adjustFloor = false;
|
||||
|
|
@ -632,7 +634,7 @@ public:
|
|||
|
||||
/// Most primitives can use these common implementations
|
||||
const char* getElementName() { return primitive->getElementName(); }
|
||||
const char* getMaterial() { return primitive->getMaterial(); }
|
||||
const char* getMaterial() { return (FindMatch::isMatchMultipleExprs(ColladaUtils::getOptions().neverImportMat, primitive->getMaterial(), false)) ? NULL : primitive->getMaterial(); }
|
||||
const domInputLocalOffset_Array& getInputs() { return primitive->getInput_array(); }
|
||||
S32 getStride() const { return stride; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue