Minor tweaks
This commit is contained in:
@@ -939,8 +939,9 @@ bool ProcessMesh(ModelData& result, OpenFbxImporterData& data, const ofbx::Mesh*
|
|||||||
for (int32 i = 0; i < shapeIndexCount; i++)
|
for (int32 i = 0; i < shapeIndexCount; i++)
|
||||||
{
|
{
|
||||||
int shapeIndex = shapeIndices[i];
|
int shapeIndex = shapeIndices[i];
|
||||||
Float3 positionDelta = ToFloat3(shapeVertices[i]);
|
BlendShapeVertex v;
|
||||||
Float3 normalDelta = shapeNormals ? ToFloat3(shapeNormals[i]) : Float3::Zero;
|
v.PositionDelta = ToFloat3(shapeVertices[i]);
|
||||||
|
v.NormalDelta = shapeNormals ? ToFloat3(shapeNormals[i]) : Float3::Zero;
|
||||||
for (int32 vertexIndex = 0; vertexIndex < vertexCount; vertexIndex++)
|
for (int32 vertexIndex = 0; vertexIndex < vertexCount; vertexIndex++)
|
||||||
{
|
{
|
||||||
int sourceIndex = triangulatedIndices[vertexIndex];
|
int sourceIndex = triangulatedIndices[vertexIndex];
|
||||||
@@ -948,10 +949,7 @@ bool ProcessMesh(ModelData& result, OpenFbxImporterData& data, const ofbx::Mesh*
|
|||||||
if (sourceIndex == shapeIndex)
|
if (sourceIndex == shapeIndex)
|
||||||
{
|
{
|
||||||
// Add blend shape vertex
|
// Add blend shape vertex
|
||||||
BlendShapeVertex v;
|
|
||||||
v.VertexIndex = vertexIndex;
|
v.VertexIndex = vertexIndex;
|
||||||
v.PositionDelta = positionDelta;
|
|
||||||
v.NormalDelta = normalDelta;
|
|
||||||
blendShapeData.Vertices.Add(v);
|
blendShapeData.Vertices.Add(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1035,6 +1035,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
|
|||||||
if (min < 0 || max >= data.Skeleton.Bones.Count())
|
if (min < 0 || max >= data.Skeleton.Bones.Count())
|
||||||
{
|
{
|
||||||
LOG(Warning, "Imported mesh \'{0}\' has invalid blend indices. It may result in invalid rendering.", mesh->Name);
|
LOG(Warning, "Imported mesh \'{0}\' has invalid blend indices. It may result in invalid rendering.", mesh->Name);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1045,6 +1046,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
|
|||||||
if (Math::Abs(sum - 1.0f) > ZeroTolerance)
|
if (Math::Abs(sum - 1.0f) > ZeroTolerance)
|
||||||
{
|
{
|
||||||
LOG(Warning, "Imported mesh \'{0}\' has invalid blend weights. It may result in invalid rendering.", mesh->Name);
|
LOG(Warning, "Imported mesh \'{0}\' has invalid blend weights. It may result in invalid rendering.", mesh->Name);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user