This reference page is linked to from the following overview topics: List of Python Fbx classes.
Layer element for mapping materials (FbxSurfaceMaterial) to a geometry.
FBX SDK 2011 and later connects materials (FbxSurfaceMaterial) to nodes (FbxNode). The direct array of this class is no longer used. The integer "n" in the index array of this class represents the n-th material (zero-based) connected to the node.
For example:
Mapping mode eAllSame and index array {0} means the whole geometry is assigned with the 0-th material connected to the node.
Mapping mode eByPolygon and index array {0, 1} means the first polygon is assigned with the 0-th material and the second polygon is assigned with the 1-th material.
You can access the materials from a node by using FbxNode::GetMaterialCount() and FbxNode::GetMaterial(int pIndex) or the more generic calls to GetSrcObjectCount<FbxSurfaceMaterial>() and GetSrcObject<FbxSurfaceMaterial>(index)
For example:
FbxNode* node; int nbMat = node->GetMaterialCount(); int nbMat1= node->GetSrcObjectCount<FbxSurfaceMaterial>(); FbxSurfaceMaterial* material; FbxLayerElementMaterial* layerElement; if (layerElement->GetMappingMode() == FbxLayerElement::eAllSame) { int index = layerElement->GetIndexArray()[0]; material = node->GetMaterial(index); }
Definition at line 1359 of file fbxlayer.h.
#include <fbxlayer.h>

Classes | |
| class | LayerElementArrayProxy |
Public Types | |
| typedef FbxLayerElementTemplate < FbxSurfaceMaterial * > | ParentClass |
Public Member Functions | |
| FBXSDK_LAYER_ELEMENT_CREATE_DECLARE (LayerElementMaterial) | |
| Allocation method. | |
| virtual void | AllocateArrays () |
| virtual void | SetOwner (FbxLayerContainer *pOwner, int pInstance=0) |
| virtual void | SetInstance (int pInstance) |
Protected Member Functions | |
| FbxLayerElementMaterial () | |
| ~FbxLayerElementMaterial () | |
Friends | |
| class | FbxLayerContainer |
Definition at line 1362 of file fbxlayer.h.
| FbxLayerElementMaterial | ( | ) | [protected] |
| ~FbxLayerElementMaterial | ( | ) | [protected] |
| FBXSDK_LAYER_ELEMENT_CREATE_DECLARE | ( | LayerElementMaterial | ) |
Allocation method.
NULL if creation fails. | virtual void AllocateArrays | ( | ) | [virtual] |
Reimplemented from FbxLayerElementTemplate< FbxSurfaceMaterial * >.
| virtual void SetOwner | ( | FbxLayerContainer * | pOwner, |
| int | pInstance = 0 |
||
| ) | [virtual] |
| virtual void SetInstance | ( | int | pInstance | ) | [inline, virtual] |
Definition at line 1389 of file fbxlayer.h.
friend class FbxLayerContainer [friend] |
Reimplemented from FbxLayerElement.
Definition at line 1406 of file fbxlayer.h.