mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-14 08:16:03 +02:00
Initial tidying
This commit is contained in:
parent
c099cfe904
commit
98cef38aea
1 changed files with 8 additions and 4 deletions
|
@ -21,7 +21,6 @@
|
|||
#include <QtCore/qpair.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
|
||||
#include <QtNetwork/QNetworkAccessManager>
|
||||
#include <QtNetwork/QNetworkRequest>
|
||||
|
||||
|
@ -537,8 +536,7 @@ bool GLTFSerializer::addMesh(const QJsonObject& object) {
|
|||
}
|
||||
|
||||
QJsonArray jsTargets;
|
||||
if (getObjectArrayVal(jsPrimitive, "targets", jsTargets, primitive.defined))
|
||||
{
|
||||
if (getObjectArrayVal(jsPrimitive, "targets", jsTargets, primitive.defined)) {
|
||||
foreach(const QJsonValue & tar, jsTargets) {
|
||||
if (tar.isObject()) {
|
||||
QJsonObject jsTarget = tar.toObject();
|
||||
|
@ -827,6 +825,8 @@ void GLTFSerializer::generateTargetData(int index, float weight, QVector<glm::ve
|
|||
}
|
||||
|
||||
bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash& mapping, const hifi::URL& url) {
|
||||
hfmModel.originalURL = url.toString();
|
||||
|
||||
int numNodes = _file.nodes.size();
|
||||
|
||||
//Build dependencies
|
||||
|
@ -1536,7 +1536,9 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
|
|||
|
||||
// populate the texture coordinates if they don't exist
|
||||
if (mesh.texCoords.size() == 0 && !hfmModel.hasSkeletonJoints) {
|
||||
for (int i = 0; i < part.triangleIndices.size(); ++i) { mesh.texCoords.push_back(glm::vec2(0.0, 1.0)); }
|
||||
for (int i = 0; i < part.triangleIndices.size(); ++i) {
|
||||
mesh.texCoords.push_back(glm::vec2(0.0, 1.0));
|
||||
}
|
||||
}
|
||||
|
||||
// Build morph targets (blend shapes)
|
||||
|
@ -2051,6 +2053,8 @@ void GLTFSerializer::glTFDebugDump() {
|
|||
|
||||
void GLTFSerializer::hfmDebugDump(const HFMModel& hfmModel) {
|
||||
qCDebug(modelformat) << "---------------- hfmModel ----------------";
|
||||
qCDebug(modelformat) << " originalURL =" << hfmModel.originalURL;
|
||||
|
||||
qCDebug(modelformat) << " hasSkeletonJoints =" << hfmModel.hasSkeletonJoints;
|
||||
qCDebug(modelformat) << " offset =" << hfmModel.offset;
|
||||
|
||||
|
|
Loading…
Reference in a new issue