#include "DisplayCommon.h"
void DisplayTextureInfo(
FbxTexture* pTexture,
int pBlendMode)
{
DisplayString(
" Name: \"", (
char *) pTexture->
GetName(),
"\"");
if (lFileTexture)
{
DisplayString(" Type: File Texture");
DisplayString(
" File Name: \"", (
char *) lFileTexture->
GetFileName(),
"\"");
}
else if (lProceduralTexture)
{
DisplayString(" Type: Procedural Texture");
}
DisplayDouble(
" Scale U: ", pTexture->
GetScaleU());
DisplayDouble(
" Scale V: ", pTexture->
GetScaleV());
DisplayBool(
" Swap UV: ", pTexture->
GetSwapUV());
const char* lAlphaSources[] = { "None", "RGB Intensity", "Black" };
DisplayString(
" Alpha Source: ", lAlphaSources[pTexture->
GetAlphaSource()]);
const char* lMappingTypes[] = { "Null", "Planar", "Spherical", "Cylindrical",
"Box", "Face", "UV", "Environment" };
DisplayString(
" Mapping Type: ", lMappingTypes[pTexture->
GetMappingType()]);
{
const char* lPlanarMappingNormals[] = { "X", "Y", "Z" };
}
const char* lBlendModes[] = { "Translucent", "Additive", "Modulate", "Modulate2", "Over", "Normal", "Dissolve", "Darken", "ColorBurn", "LinearBurn",
"DarkerColor", "Lighten", "Screen", "ColorDodge", "LinearDodge", "LighterColor", "SoftLight", "HardLight", "VividLight",
"LinearLight", "PinLight", "HardMix", "Difference", "Exclusion", "Substract", "Divide", "Hue", "Saturation", "Color",
"Luminosity", "Overlay"};
if(pBlendMode >= 0)
DisplayString(" Blend Mode: ", lBlendModes[pBlendMode]);
if (lFileTexture)
{
const char* lMaterialUses[] = { "Model Material", "Default Material" };
DisplayString(
" Material Use: ", lMaterialUses[lFileTexture->
GetMaterialUse()]);
}
const char* pTextureUses[] = { "Standard", "Shadow Map", "Light Map",
"Spherical Reflexion Map", "Sphere Reflexion Map", "Bump Normal Map" };
DisplayString(
" Texture Use: ", pTextureUses[pTexture->
GetTextureUse()]);
DisplayString("");
}
void FindAndDisplayTextureInfoByProperty(
FbxProperty pProperty,
bool& pDisplayHeader,
int pMaterialIndex){
{
for (int j = 0; j < lTextureCount; ++j)
{
if (lLayeredTexture)
{
DisplayInt(" Layered Texture: ", j);
for(int k =0; k<lNbTextures; ++k)
{
if(lTexture)
{
if(pDisplayHeader){
DisplayInt(" Textures connected to Material ", pMaterialIndex);
pDisplayHeader = false;
}
DisplayString(
" Textures for ", pProperty.
GetName());
DisplayInt(" Texture ", k);
DisplayTextureInfo(lTexture, (int) lBlendMode);
}
}
}
else
{
if(lTexture)
{
if(pDisplayHeader){
DisplayInt(" Textures connected to Material ", pMaterialIndex);
pDisplayHeader = false;
}
DisplayString(
" Textures for ", pProperty.
GetName());
DisplayInt(" Texture ", j);
DisplayTextureInfo(lTexture, -1);
}
}
}
}
}
{
int lMaterialIndex;
return;
for (lMaterialIndex = 0; lMaterialIndex < lNbMat; lMaterialIndex++){
bool lDisplayHeader = true;
if(lMaterial){
int lTextureIndex;
{
FindAndDisplayTextureInfoByProperty(lProperty, lDisplayHeader, lMaterialIndex);
}
}
}
}