mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 17:38:34 +02:00
Warn if baked mesh is empty for OBJBaker
This commit is contained in:
parent
266f3a8ad8
commit
64fbf51ac2
1 changed files with 3 additions and 1 deletions
|
@ -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
|
// 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
|
// 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
|
// The nth mesh part gets the nth material
|
||||||
{
|
if (!dracoMesh.isEmpty()) {
|
||||||
std::vector<hifi::ByteArray> newMaterialList;
|
std::vector<hifi::ByteArray> newMaterialList;
|
||||||
newMaterialList.reserve(_materialIDs.size());
|
newMaterialList.reserve(_materialIDs.size());
|
||||||
for (auto materialID : _materialIDs) {
|
for (auto materialID : _materialIDs) {
|
||||||
|
@ -128,6 +128,8 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, const hfm::Model::Pointer& h
|
||||||
FBXNode dracoNode;
|
FBXNode dracoNode;
|
||||||
buildDracoMeshNode(dracoNode, dracoMesh, newMaterialList);
|
buildDracoMeshNode(dracoNode, dracoMesh, newMaterialList);
|
||||||
geometryNode.children.append(dracoNode);
|
geometryNode.children.append(dracoNode);
|
||||||
|
} else {
|
||||||
|
handleWarning("Baked mesh for OBJ model '" + _modelURL.toString() + "' is empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generating Texture Node
|
// Generating Texture Node
|
||||||
|
|
Loading…
Reference in a new issue