use of get<some name> methods that already return nulls/false when attempting to load

in contexts where we would want to try first (pt2)
This commit is contained in:
AzaezelX 2025-05-28 17:45:02 -05:00
parent 40974dd14b
commit 8bd145d54f
7 changed files with 17 additions and 25 deletions

View file

@ -1030,7 +1030,7 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
{
Torque::Path diffusePath;
if (mat->getDiffuseMapAsset(0).notNull())
if (mat->getDiffuseMap(0))
diffusePath = Torque::Path(mat->getDiffuseMapAsset(0)->getImageFile());
else
diffusePath = String("warningMat");
@ -1040,7 +1040,7 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
}
else
{
if (mat->getDiffuseMapAsset(0).notNull())
if (mat->getDiffuseMap(0))
diffuseMap += Torque::Path(mat->getDiffuseMapAsset(0)->getImageFile());
else
diffuseMap += "warningMat";
@ -1316,7 +1316,7 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
{
Torque::Path diffusePath;
if (mat->getDiffuseMapAsset(0).notNull())
if (mat->getDiffuseMap(0))
diffusePath = Torque::Path(mat->getDiffuseMapAsset(0)->getImageFile());
else
diffusePath = String("warningMat");
@ -1326,7 +1326,7 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
}
else
{
if (mat->getDiffuseMapAsset(0).notNull())
if (mat->getDiffuseMap(0))
diffuseMap += Torque::Path(mat->getDiffuseMapAsset(0)->getImageFile());
else
diffuseMap += "warningMat";