Add more conditions for skeleton import and add blendshapes for prefab recognition

This commit is contained in:
alsed
2025-09-07 13:45:21 -03:00
parent 9a363e2882
commit a8768f918e
4 changed files with 5 additions and 5 deletions

View File

@@ -1184,7 +1184,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
}
}
}
if (EnumHasAnyFlags(options.ImportTypes, ImportDataTypes::Skeleton))
if (EnumHasAnyFlags(options.ImportTypes, ImportDataTypes::Skeleton) && data.Skeleton.Bones.HasItems())
{
LOG(Info, "Imported skeleton has {0} bones and {1} nodes", data.Skeleton.Bones.Count(), data.Nodes.Count());
@@ -1324,7 +1324,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
for (int32 i = 0; i < meshesCount; i++)
{
const auto mesh = data.LODs[0].Meshes[i];
if (mesh->BlendIndices.IsEmpty() || mesh->BlendWeights.IsEmpty())
if ((mesh->BlendIndices.IsEmpty() || mesh->BlendWeights.IsEmpty()) && data.Skeleton.Bones.HasItems())
{
auto indices = Int4::Zero;
auto weights = Float4::UnitX;