Преглед изворни кода

Merge pull request #3598 from thomasbiang/master

GLTF2: Allow Export Node in TRS format
Kim Kulling пре 4 година
родитељ
комит
3174a9cac8
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      code/AssetLib/glTF2/glTF2Exporter.cpp

+ 1 - 1
code/AssetLib/glTF2/glTF2Exporter.cpp

@@ -1229,7 +1229,7 @@ unsigned int glTF2Exporter::ExportNode(const aiNode* n, Ref<Node>& parent)
     node->name = name;
 
     if (!n->mTransformation.IsIdentity()) {
-		if (mScene->mNumAnimations > 0) {
+		if (mScene->mNumAnimations > 0 || (mProperties && mProperties->HasPropertyBool("GLTF2_NODE_IN_TRS"))) {
 			aiQuaternion quaternion;
 			n->mTransformation.Decompose(*reinterpret_cast<aiVector3D *>(&node->scale.value), quaternion, *reinterpret_cast<aiVector3D *>(&node->translation.value));