mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-06-03 00:58:13 -04:00
small improved
This commit is contained in:
parent
54ed3971a2
commit
7f13c90189
@ -478,47 +478,31 @@ namespace AssetStudio
|
|||||||
bool hasTexture = false;
|
bool hasTexture = false;
|
||||||
|
|
||||||
for each (ImportedMaterialTexture^ texture in mat->Textures)
|
for each (ImportedMaterialTexture^ texture in mat->Textures)
|
||||||
|
{
|
||||||
|
auto pTexture = ExportTexture(ImportedHelpers::FindTexture(texture->Name, imported->TextureList));
|
||||||
|
if (pTexture != NULL)
|
||||||
{
|
{
|
||||||
if (texture->Dest == 0)
|
if (texture->Dest == 0)
|
||||||
{
|
{
|
||||||
FbxFileTexture* pTextureDiffuse = ExportTexture(ImportedHelpers::FindTexture(texture->Name, imported->TextureList));
|
LinkTexture(texture, pTexture, pMat->Diffuse);
|
||||||
if (pTextureDiffuse != NULL)
|
|
||||||
{
|
|
||||||
LinkTexture(texture, pTextureDiffuse, pMat->Diffuse);
|
|
||||||
hasTexture = true;
|
hasTexture = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (texture->Dest == 1)
|
else if (texture->Dest == 1)
|
||||||
{
|
{
|
||||||
FbxFileTexture* pTextureNormalMap = ExportTexture(ImportedHelpers::FindTexture(texture->Name, imported->TextureList));
|
LinkTexture(texture, pTexture, pMat->NormalMap);
|
||||||
if (pTextureNormalMap != NULL)
|
|
||||||
{
|
|
||||||
LinkTexture(texture, pTextureNormalMap, pMat->NormalMap);
|
|
||||||
hasTexture = true;
|
hasTexture = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (texture->Dest == 2)
|
else if (texture->Dest == 2)
|
||||||
{
|
{
|
||||||
FbxFileTexture* pTextureSpecular = ExportTexture(ImportedHelpers::FindTexture(texture->Name, imported->TextureList));
|
LinkTexture(texture, pTexture, pMat->Specular);
|
||||||
if (pTextureSpecular != NULL)
|
|
||||||
{
|
|
||||||
LinkTexture(texture, pTextureSpecular, pMat->Specular);
|
|
||||||
hasTexture = true;
|
hasTexture = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (texture->Dest == 3)
|
else if (texture->Dest == 3)
|
||||||
{
|
{
|
||||||
FbxFileTexture* pTextureBump = ExportTexture(ImportedHelpers::FindTexture(texture->Name, imported->TextureList));
|
LinkTexture(texture, pTexture, pMat->Bump);
|
||||||
if (pTextureBump != NULL)
|
|
||||||
{
|
|
||||||
LinkTexture(texture, pTextureBump, pMat->Bump);
|
|
||||||
hasTexture = true;
|
hasTexture = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ExportTexture(ImportedHelpers::FindTexture(texture->Name, imported->TextureList));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasTexture)
|
if (hasTexture)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user