mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 10:08:46 +02:00
Don't append trailing FBX root nodes to the tail of the tree
This commit is contained in:
parent
9173db62c7
commit
d334f1c35c
1 changed files with 3 additions and 3 deletions
|
@ -323,12 +323,12 @@ public:
|
|||
};
|
||||
|
||||
void appendModelIDs(const QString& parentID, const QMultiMap<QString, QString>& connectionChildMap,
|
||||
QHash<QString, FBXModel>& models, QSet<QString>& remainingModels, QVector<QString>& modelIDs) {
|
||||
QHash<QString, FBXModel>& models, QSet<QString>& remainingModels, QVector<QString>& modelIDs, bool isRootNode = false) {
|
||||
if (remainingModels.contains(parentID)) {
|
||||
modelIDs.append(parentID);
|
||||
remainingModels.remove(parentID);
|
||||
}
|
||||
int parentIndex = modelIDs.size() - 1;
|
||||
int parentIndex = isRootNode ? -1 : modelIDs.size() - 1;
|
||||
foreach (const QString& childID, connectionChildMap.values(parentID)) {
|
||||
if (remainingModels.contains(childID)) {
|
||||
FBXModel& model = models[childID];
|
||||
|
@ -1478,7 +1478,7 @@ FBXGeometry* FBXReader::extractFBXGeometry(const QVariantHash& mapping, const QS
|
|||
}
|
||||
}
|
||||
QString topID = getTopModelID(_connectionParentMap, models, first, url);
|
||||
appendModelIDs(_connectionParentMap.value(topID), _connectionChildMap, models, remainingModels, modelIDs);
|
||||
appendModelIDs(_connectionParentMap.value(topID), _connectionChildMap, models, remainingModels, modelIDs, true);
|
||||
}
|
||||
|
||||
// figure the number of animation frames from the curves
|
||||
|
|
Loading…
Reference in a new issue