map/texture enable/disable info

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
In 3DS MAX, on the Compact Material Editor panel's "Maps" section, I unchecked the checkbox of one map channel item, i.e. "Opacity", (disable it), and then export it to FBX.
then I use FBX SDK to import the FBX, but I found the the texture is still available for "Opacity" map (FbxSurfaceMaterial::sTransparentColor):
FbxProperty prop = mat->FindProperty(FbxSurfaceMaterial::sTransparentColor); int count = prop.IsValid() ? prop.GetSrcObjectCount<FbxTexture>() : 0; for(int j = 0; j < count; ++j) { FbxLayeredTexture* layer = FbxCast<FbxLayeredTexture>(prop.GetSrcObject<FbxLayeredTexture>(j)); if( layer != NULL ) { int texCount = layer->GetSrcObjectCount<FbxTexture>(); for(int k = 0; k < texCount; ++k) { FbxTexture* tex = static_cast<FbxTexture*>( layer->GetSrcObject<FbxTexture>(k) ); FbxFileTexture* fileTex = FbxCast<FbxFileTexture>(tex); if( fileTex != NULL ) { const char* file = fileTex->GetFileName(); ...; } } } else { for(int k = 0; k < count; ++k) { FbxTexture* tex = static_cast<FbxTexture*>( prop.GetSrcObject<FbxTexture>(k) ); FbxFileTexture* fileTex = FbxCast<FbxFileTexture>(tex); if( fileTex != NULL ) { const char* file = fileTex->GetFileName(); ...; } } } }//for each fbx layer
Code above is copied from the SDK samples.
It make sense that I can still get the texture file name of FbxSurfaceMaterial::sTransparentColor, but how can I check whether the texture is enabled/disabled like in 3DS MAX?
AFAIK in Max SDK I can use StdMat::MapEnabled() to check, but what about the FBX SDK?
p.s. I don't event know if this enabled/diabled info still available after exporting to FBX, so it's maybe inappropriate to post it here, but if the SDK doesn't support this, then the FBX exporter for 3DS Max can't handle that either, its still seems like a SDK feature.