static void ReadNodeAttributes()

in src/fbx/Fbx2Raw.cpp [595:656]


static void ReadNodeAttributes(
    RawModel& raw,
    FbxScene* pScene,
    FbxNode* pNode,
    const std::map<const FbxTexture*, FbxString>& textureLocations) {
  if (!pNode->GetVisibility()) {
    return;
  }

  // Only support non-animated user defined properties for now
  FbxProperty objectProperty = pNode->GetFirstProperty();
  while (objectProperty.IsValid()) {
    if (objectProperty.GetFlag(FbxPropertyFlags::eUserDefined)) {
      ReadNodeProperty(raw, pNode, objectProperty);
    }

    objectProperty = pNode->GetNextProperty(objectProperty);
  }

  FbxNodeAttribute* pNodeAttribute = pNode->GetNodeAttribute();
  if (pNodeAttribute != nullptr) {
    const FbxNodeAttribute::EType attributeType = pNodeAttribute->GetAttributeType();
    switch (attributeType) {
      case FbxNodeAttribute::eMesh:
      case FbxNodeAttribute::eNurbs:
      case FbxNodeAttribute::eNurbsSurface:
      case FbxNodeAttribute::eTrimNurbsSurface:
      case FbxNodeAttribute::ePatch: {
        ReadMesh(raw, pScene, pNode, textureLocations);
        break;
      }
      case FbxNodeAttribute::eCamera: {
        ReadCamera(raw, pScene, pNode);
        break;
      }
      case FbxNodeAttribute::eLight:
        ReadLight(raw, pScene, pNode);
        break;
      case FbxNodeAttribute::eUnknown:
      case FbxNodeAttribute::eNull:
      case FbxNodeAttribute::eMarker:
      case FbxNodeAttribute::eSkeleton:
      case FbxNodeAttribute::eCameraStereo:
      case FbxNodeAttribute::eCameraSwitcher:
      case FbxNodeAttribute::eOpticalReference:
      case FbxNodeAttribute::eOpticalMarker:
      case FbxNodeAttribute::eNurbsCurve:
      case FbxNodeAttribute::eBoundary:
      case FbxNodeAttribute::eShape:
      case FbxNodeAttribute::eLODGroup:
      case FbxNodeAttribute::eSubDiv:
      case FbxNodeAttribute::eCachedEffect:
      case FbxNodeAttribute::eLine: {
        break;
      }
    }
  }

  for (int child = 0; child < pNode->GetChildCount(); child++) {
    ReadNodeAttributes(raw, pScene, pNode->GetChild(child), textureLocations);
  }
}