From 64fbf51ac25d8708e9e3410ac2ac4b45195a8601 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Mon, 18 Mar 2019 13:13:12 -0700 Subject: [PATCH] Warn if baked mesh is empty for OBJBaker --- libraries/baking/src/OBJBaker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/baking/src/OBJBaker.cpp b/libraries/baking/src/OBJBaker.cpp index ebc24201f4..70bdeb2071 100644 --- a/libraries/baking/src/OBJBaker.cpp +++ b/libraries/baking/src/OBJBaker.cpp @@ -119,7 +119,7 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, const hfm::Model::Pointer& h // Store the draco node containing the compressed mesh information, along with the per-meshPart material IDs the draco node references // Because we redefine the material IDs when initializing the material nodes above, we pass that in for the material list // The nth mesh part gets the nth material - { + if (!dracoMesh.isEmpty()) { std::vector newMaterialList; newMaterialList.reserve(_materialIDs.size()); for (auto materialID : _materialIDs) { @@ -128,6 +128,8 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, const hfm::Model::Pointer& h FBXNode dracoNode; buildDracoMeshNode(dracoNode, dracoMesh, newMaterialList); geometryNode.children.append(dracoNode); + } else { + handleWarning("Baked mesh for OBJ model '" + _modelURL.toString() + "' is empty"); } // Generating Texture Node