mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 16:50:43 +02:00
Baking - if mesh extraction or compression fails don't change node
Needed to prevent a null (would-be Draco mesh) node being added.
This commit is contained in:
parent
37ead11cf9
commit
82e43aea11
2 changed files with 31 additions and 31 deletions
|
@ -257,8 +257,7 @@ void FBXBaker::rewriteAndBakeSceneModels() {
|
|||
} else if (hasWarnings()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
objectChild.children.push_back(dracoMeshNode);
|
||||
|
||||
static const std::vector<QString> nodeNamesToDelete {
|
||||
|
@ -289,7 +288,9 @@ void FBXBaker::rewriteAndBakeSceneModels() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // Geometry Object
|
||||
|
||||
} // foreach root child
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,8 +62,7 @@ QByteArray FBXWriter::encodeFBX(const FBXNode& root) {
|
|||
out.setVersion(QDataStream::Qt_4_5);
|
||||
|
||||
out.writeRawData(FBX_BINARY_PROLOG, FBX_BINARY_PROLOG.size());
|
||||
auto bytes = QByteArray(FBX_HEADER_BYTES_BEFORE_VERSION - FBX_BINARY_PROLOG.size(), '\0');
|
||||
out.writeRawData(bytes, bytes.size());
|
||||
out.writeRawData("\0\x1a", 3); // Blender needs this header component.
|
||||
|
||||
#ifdef USE_FBX_2016_FORMAT
|
||||
out << FBX_VERSION_2016;
|
||||
|
|
Loading…
Reference in a new issue