theRelativePath = aRelPath;
return true;
}
+
aPath = aFolder;
+ for (; aPath.Length() >= 2;)
+ {
+ if (aPath.Value (aPath.Length()) == '/'
+ || aPath.Value (aPath.Length()) == '\\')
+ {
+ aPath = aPath.SubString (1, aPath.Length() - 1);
+ continue;
+ }
+ break;
+ }
}
}
}
if (validateColor (aColor))
{
aMat.SpecularColor = Quantity_Color (aColor.r(), aColor.g(), aColor.b(), Quantity_TOC_RGB);
+ hasAspect = true;
}
}
else if (::memcmp (aPos, "Ns", 2) == 0
if (aSpecular >= 0.0)
{
aMat.Shininess = (float )Min (aSpecular / 1000.0, 1.0);
+ hasAspect = true;
}
}
else if (::memcmp (aPos, "Tr", 2) == 0
&& aTransp <= 0.99)
{
aMat.Transparency = (float )aTransp;
+ hasAspect = true;
}
}
else if (*aPos == 'd' && IsSpace (aPos[1]))
&& anAlpha >= 0.01)
{
aMat.Transparency = float(1.0 - anAlpha);
+ hasAspect = true;
}
}
else if (::memcmp (aPos, "map_Kd", 6) == 0
if (RWObj_Tools::ReadName (aPos, aMat.DiffuseTexture))
{
processTexturePath (aMat.DiffuseTexture, theFolder);
+ hasAspect = true;
}
}
else if (::memcmp (aPos, "map_Ks", 6) == 0
if (RWObj_Tools::ReadName (aPos, aMat.SpecularTexture))
{
processTexturePath (aMat.SpecularTexture, theFolder);
+ hasAspect = true;
}
}
else if (::memcmp (aPos, "map_Bump", 8) == 0
if (RWObj_Tools::ReadName (aPos, aMat.BumpTexture))
{
processTexturePath (aMat.BumpTexture, theFolder);
+ hasAspect = true;
}
}
/*else if (::memcmp (aPos, "illum", 5) == 0)