Revert partially #2147 to fix #4091 when imported as fbx

This commit is contained in:
2026-09-15 12:54:56 +02:00
parent d7f52ee832
commit 3ff1f825a7
2 changed files with 5 additions and 0 deletions
@@ -794,7 +794,9 @@ CreateAssetResult ImportModel::CreatePrefab(CreateAssetContext& context, const M
// Setup node in hierarchy
nodeToActor.Add(nodeIndex, nodeActor);
nodeActor->SetName(node.Name);
nodeActor->SetLocalTransform(node.LocalTransform);
#if 0
// When use local origin is checked, it shifts everything over the same amount, including the root. This tries to work around that.
if (!(nodeIndex == 0 && options.UseLocalOrigin))
{
@@ -829,6 +831,7 @@ CreateAssetResult ImportModel::CreatePrefab(CreateAssetContext& context, const M
nodeActor->SetLocalTransform(positionOffset);
}
#endif
if (nodeIndex == 0)
{
@@ -1631,6 +1631,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
}
}
}
#if 0
if (EnumHasAnyFlags(options.ImportTypes, ImportDataTypes::Geometry) && options.Type == ModelType::Prefab)
{
// Apply just the scale and rotations.
@@ -1663,6 +1664,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
}
}
}
#endif
if (EnumHasAnyFlags(options.ImportTypes, ImportDataTypes::Animations))
{
for (auto& animation : data.Animations)