Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Layer reference mode - convert from eDirect to eIndexToDirect

0 REPLIES 0
Reply
Message 1 of 1
eshalev
376 Views, 0 Replies

Layer reference mode - convert from eDirect to eIndexToDirect

I have an FBX where normal, tangent and UVs layers are created with mapping mode eByPolygonVertex and reference mode eIndexToDirect.

After I edit the FBX in Maya 2016.5 and export it, the reference mode changed.

question number 1: Why Maya changes the reference mode in layers?

 

In order for my tools to work correctly with the FBX file I need to change the reference mode to eIndexToDirect, for example in the case of the Normal layer this is what I am doing:

FbxGeometryElementNormal* lGeometryElementNormal = pMesh->GetElementNormal();
if (lGeometryElementNormal->GetReferenceMode() != FbxGeometryElement::eIndexToDirect)
{
    //FBX mesh with unsupported reference mode
    const fbxsdk::FbxLayerContainer* pContainer = lGeometryElementNormal->GetOwner();
    pContainer->ConvertDirectToIndexToDirect(0);

}

but this doesn't even compile, the error I get is:

the object has type qualifiers that are not compatible with the member function "fbxsdk::FbxLayerContainer::ConvertDirectToIndexToDirect"

 

so ...question number 2: What I am doing wrong, and what is the right way to convert the layers reference mode?

 

thanks,

Emanuel

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report