mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:17:43 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into newEditGrab
This commit is contained in:
commit
3bbe821aba
3 changed files with 14 additions and 9 deletions
|
@ -272,6 +272,11 @@ glm::mat4 getGlobalTransform(const QMultiMap<QString, QString>& _connectionParen
|
||||||
const FBXModel& model = models.value(nodeID);
|
const FBXModel& model = models.value(nodeID);
|
||||||
globalTransform = glm::translate(model.translation) * model.preTransform * glm::mat4_cast(model.preRotation *
|
globalTransform = glm::translate(model.translation) * model.preTransform * glm::mat4_cast(model.preRotation *
|
||||||
model.rotation * model.postRotation) * model.postTransform * globalTransform;
|
model.rotation * model.postRotation) * model.postTransform * globalTransform;
|
||||||
|
if (model.hasGeometricOffset) {
|
||||||
|
glm::mat4 geometricOffset = createMatFromScaleQuatAndPos(model.geometricScaling, model.geometricRotation, model.geometricTranslation);
|
||||||
|
globalTransform = globalTransform * geometricOffset;
|
||||||
|
}
|
||||||
|
|
||||||
if (mixamoHack) {
|
if (mixamoHack) {
|
||||||
// there's something weird about the models from Mixamo Fuse; they don't skin right with the full transform
|
// there's something weird about the models from Mixamo Fuse; they don't skin right with the full transform
|
||||||
return globalTransform;
|
return globalTransform;
|
||||||
|
@ -323,12 +328,12 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
void appendModelIDs(const QString& parentID, const QMultiMap<QString, QString>& connectionChildMap,
|
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)) {
|
if (remainingModels.contains(parentID)) {
|
||||||
modelIDs.append(parentID);
|
modelIDs.append(parentID);
|
||||||
remainingModels.remove(parentID);
|
remainingModels.remove(parentID);
|
||||||
}
|
}
|
||||||
int parentIndex = modelIDs.size() - 1;
|
int parentIndex = isRootNode ? -1 : modelIDs.size() - 1;
|
||||||
foreach (const QString& childID, connectionChildMap.values(parentID)) {
|
foreach (const QString& childID, connectionChildMap.values(parentID)) {
|
||||||
if (remainingModels.contains(childID)) {
|
if (remainingModels.contains(childID)) {
|
||||||
FBXModel& model = models[childID];
|
FBXModel& model = models[childID];
|
||||||
|
@ -1478,7 +1483,7 @@ FBXGeometry* FBXReader::extractFBXGeometry(const QVariantHash& mapping, const QS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QString topID = getTopModelID(_connectionParentMap, models, first, url);
|
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
|
// figure the number of animation frames from the curves
|
||||||
|
|
|
@ -37,10 +37,10 @@
|
||||||
QString TEMP_DIR_FORMAT { "%1-%2-%3" };
|
QString TEMP_DIR_FORMAT { "%1-%2-%3" };
|
||||||
|
|
||||||
#if !defined(Q_OS_ANDROID) && defined(DEV_BUILD)
|
#if !defined(Q_OS_ANDROID) && defined(DEV_BUILD)
|
||||||
#if defined(Q_OS_OSX)
|
|
||||||
static bool USE_SOURCE_TREE_RESOURCES = true;
|
|
||||||
#else
|
|
||||||
static bool USE_SOURCE_TREE_RESOURCES() {
|
static bool USE_SOURCE_TREE_RESOURCES() {
|
||||||
|
#if defined(Q_OS_OSX)
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
static bool result = false;
|
static bool result = false;
|
||||||
static std::once_flag once;
|
static std::once_flag once;
|
||||||
std::call_once(once, [&] {
|
std::call_once(once, [&] {
|
||||||
|
@ -48,8 +48,8 @@ static bool USE_SOURCE_TREE_RESOURCES() {
|
||||||
result = QProcessEnvironment::systemEnvironment().contains(USE_SOURCE_TREE_RESOURCES_FLAG);
|
result = QProcessEnvironment::systemEnvironment().contains(USE_SOURCE_TREE_RESOURCES_FLAG);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEV_BUILD
|
#ifdef DEV_BUILD
|
||||||
|
|
|
@ -1344,7 +1344,7 @@ function recursiveDelete(entities, childrenList, deletedIDs) {
|
||||||
var entityID = entities[i];
|
var entityID = entities[i];
|
||||||
var children = Entities.getChildrenIDs(entityID);
|
var children = Entities.getChildrenIDs(entityID);
|
||||||
var grandchildrenList = [];
|
var grandchildrenList = [];
|
||||||
recursiveDelete(children, grandchildrenList);
|
recursiveDelete(children, grandchildrenList, deletedIDs);
|
||||||
var initialProperties = Entities.getEntityProperties(entityID);
|
var initialProperties = Entities.getEntityProperties(entityID);
|
||||||
childrenList.push({
|
childrenList.push({
|
||||||
entityID: entityID,
|
entityID: entityID,
|
||||||
|
|
Loading…
Reference in a new issue