From 57a56b7b1d390a7ab0b8e93aaf6a2f01a0254725 Mon Sep 17 00:00:00 2001 From: ywang Date: Thu, 25 Jul 2019 13:14:54 -0700 Subject: [PATCH] extra layer for multi uv sets --- code/FBX/FBXExporter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 08f4bdbc9..ae742dd5d 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -1219,6 +1219,16 @@ void FBXExporter::WriteObjects () layer.AddChild(le); layer.Dump(outstream, binary, indent); + for(unsigned int lr = 1; lr < m->GetNumUVChannels(); ++ lr) + { + FBX::Node layerExtra("Layer", int32_t(1)); + layerExtra.AddChild("Version", int32_t(100)); + FBX::Node leExtra("LayerElement"); + leExtra.AddChild("Type", "LayerElementUV"); + leExtra.AddChild("TypedIndex", int32_t(lr)); + layerExtra.AddChild(leExtra); + layerExtra.Dump(outstream, binary, indent); + } // finish the node record indent = 1; n.End(outstream, binary, indent, true);