mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
material definition
changing the beast over to the refactor
This commit is contained in:
parent
4d980e5406
commit
cebfdbc5ec
13 changed files with 61 additions and 105 deletions
|
|
@ -208,8 +208,8 @@ Material *ColladaAppMaterial::createMaterial(const Torque::Path& path) const
|
|||
Material *newMat = MATMGR->allocateAndRegister( cleanName, getName() );
|
||||
Con::setVariable("$Con::File", oldScriptFile); // restore script path
|
||||
|
||||
newMat->mDiffuseMapName[0] = diffuseMap;
|
||||
newMat->mNormalMapName[0] = normalMap;
|
||||
newMat->_setDiffuseMap(diffuseMap, 0);
|
||||
newMat->_setNormalMap(normalMap, 0);
|
||||
|
||||
newMat->mDiffuse[0] = diffuseColor;
|
||||
newMat->mRoughness[0] = roughness;
|
||||
|
|
|
|||
|
|
@ -1030,8 +1030,8 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
|
|||
{
|
||||
Torque::Path diffusePath;
|
||||
|
||||
if (mat->mDiffuseMapName[0] != StringTable->EmptyString())
|
||||
diffusePath = Torque::Path(mat->mDiffuseMapName[0]);
|
||||
if (mat->getDiffuseMapAsset(0).notNull())
|
||||
diffusePath = Torque::Path(mat->getDiffuseMapAsset(0)->getImageFile());
|
||||
else
|
||||
diffusePath = String("warningMat");
|
||||
|
||||
|
|
@ -1040,8 +1040,8 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
|
|||
}
|
||||
else
|
||||
{
|
||||
if (mat->mDiffuseMapName[0] != StringTable->EmptyString())
|
||||
diffuseMap += Torque::Path(mat->mDiffuseMapName[0]);
|
||||
if (mat->getDiffuseMapAsset(0).notNull())
|
||||
diffuseMap += Torque::Path(mat->getDiffuseMapAsset(0)->getImageFile());
|
||||
else
|
||||
diffuseMap += "warningMat";
|
||||
}
|
||||
|
|
@ -1316,8 +1316,8 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
|
|||
{
|
||||
Torque::Path diffusePath;
|
||||
|
||||
if (mat->mDiffuseMapName[0] != StringTable->EmptyString())
|
||||
diffusePath = Torque::Path(mat->mDiffuseMapName[0]);
|
||||
if (mat->getDiffuseMapAsset(0).notNull())
|
||||
diffusePath = Torque::Path(mat->getDiffuseMapAsset(0)->getImageFile());
|
||||
else
|
||||
diffusePath = String("warningMat");
|
||||
|
||||
|
|
@ -1326,8 +1326,8 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
|
|||
}
|
||||
else
|
||||
{
|
||||
if (mat->mDiffuseMapName[0] != StringTable->EmptyString())
|
||||
diffuseMap += Torque::Path(mat->mDiffuseMapName[0]);
|
||||
if (mat->getDiffuseMapAsset(0).notNull())
|
||||
diffuseMap += Torque::Path(mat->getDiffuseMapAsset(0)->getImageFile());
|
||||
else
|
||||
diffuseMap += "warningMat";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue