Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / MAX layers accessing
  RSS 2.0 ATOM  

MAX layers accessing
Rate this thread
 
62784
 
Permlink of this thread  
avatar
  • ultrablox
  • Posted: 13 December 2011 12:02 AM
  • Total Posts: 3
  • Joined: 12 December 2011 11:49 PM

Hi!
I am trying to read layers data from fbx file (imported from .max), that are in Tools -> Manage Layers window (in 3ds max design 2012). Unfortunately, non KFbxNodes, KFbxMeshes doesn’t have any methods, that contains needed information. And I can’t find any global objects, that contains needed info. Where can i find global list of layers, and link from mesh to layer?



Replies: 0
avatar

Hi, Ultrablox, I am not 100% sure about your question.
But I think you are looking for where layer info is stored in FBX.
It is called DisplayLayer in FBX, and the link from mesh to the layer is described by connections between the KFbxMesh and the KFbxDisplayLayer.
I attached an ascii FBX file exported from 3ds Max, it has two layers,and each layer contain some mesh.



Jiayang Xu
Maya Data Platform
Autodesk

Attachment Attachment
Replies: 0
avatar

Thank you for reply, i discovered 2 ways:
1.
Get layer with
for(int i = 0; i < pScene->GetMemberCount(KFbxCriteria::ObjectType(KFbxDisplayLayer::ClassId)); i++)
{
KFbxDisplayLayer * l = (KFbxDisplayLayer*)pScene->GetMember(KFbxCriteria::ObjectType(KFbxDisplayLayer::ClassId), i);
for(int j = 0; j < l->GetMemberCount(); j++)
{
KFbxObject * node = l->GetMember(j);
}
}

and node is attached to layer.

2. Really throughout the connection:

KFbxDisplayLayer * fbxLayer = (KFbxDisplayLayer*)(node->GetDstObject(KFbxCriteria::ObjectType(KFbxDisplayLayer::ClassId), 0));



Replies: 0