better comment for animated prefab and remove unused code in remap blendshapes
This commit is contained in:
@@ -2114,12 +2114,10 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
|
||||
#undef REMAP_VERTEX_BUFFER
|
||||
|
||||
// Remap blend shapes
|
||||
dstMesh->BlendShapes.Clear();
|
||||
dstMesh->BlendShapes.EnsureCapacity(srcMesh->BlendShapes.Count(), false);
|
||||
for (int32 blendShapeIndex = 0; blendShapeIndex < srcMesh->BlendShapes.Count(); blendShapeIndex++)
|
||||
{
|
||||
const auto& srcBlendShape = srcMesh->BlendShapes[blendShapeIndex];
|
||||
//auto& dstBlendShape = dstMesh->BlendShapes[blendShapeIndex];
|
||||
BlendShape dstBlendShape;
|
||||
dstBlendShape.Name = srcBlendShape.Name;
|
||||
dstBlendShape.Weight = srcBlendShape.Weight;
|
||||
@@ -2132,18 +2130,11 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
|
||||
dstBlendShape.Vertices.Add(v);
|
||||
}
|
||||
|
||||
// Add only valid blend shapes
|
||||
if (dstBlendShape.Vertices.HasItems())
|
||||
dstMesh->BlendShapes.Add(dstBlendShape);
|
||||
}
|
||||
|
||||
/*
|
||||
// Remove empty blend shapes
|
||||
for (int32 blendShapeIndex = dstMesh->BlendShapes.Count() - 1; blendShapeIndex >= 0; blendShapeIndex--)
|
||||
{
|
||||
if (dstMesh->BlendShapes[blendShapeIndex].Vertices.IsEmpty())
|
||||
dstMesh->BlendShapes.RemoveAt(blendShapeIndex);
|
||||
}
|
||||
*/
|
||||
// Optimize generated LOD
|
||||
meshopt_optimizeVertexCache(dstMesh->Indices.Get(), dstMesh->Indices.Get(), dstMeshIndexCount, dstMeshVertexCount);
|
||||
meshopt_optimizeOverdraw(dstMesh->Indices.Get(), dstMesh->Indices.Get(), dstMeshIndexCount, (const float*)dstMesh->Positions.Get(), dstMeshVertexCount, sizeof(Float3), 1.05f);
|
||||
|
||||
Reference in New Issue
Block a user