Merge remote-tracking branch 'origin/1.1' into linux-editor
# Conflicts: # Source/FlaxEngine.Gen.cs # Source/Tools/Flax.Build/Utilities/Utilities.cs
This commit is contained in:
@@ -355,7 +355,7 @@ bool ProcessMesh(AssimpImporterData& data, const aiMesh* aMesh, MeshData& mesh,
|
||||
mesh.BlendIndices.SetAll(Int4::Zero);
|
||||
mesh.BlendWeights.SetAll(Vector4::Zero);
|
||||
|
||||
// Build skinning clusters and fill controls points data stutcture
|
||||
// Build skinning clusters and fill controls points data structure
|
||||
for (unsigned boneId = 0; boneId < aMesh->mNumBones; boneId++)
|
||||
{
|
||||
const auto aBone = aMesh->mBones[boneId];
|
||||
|
||||
@@ -744,7 +744,7 @@ bool ProcessMesh(OpenFbxImporterData& data, const ofbx::Mesh* aMesh, MeshData& m
|
||||
auto length = delta.Length();
|
||||
if (length > ZeroTolerance)
|
||||
delta /= length;*/
|
||||
auto delta = Vector3::Zero; // TODO: blend shape normals deltas fix when importing from ofbx
|
||||
auto delta = Vector3::Zero; // TODO: blend shape normals deltas fix when importing from fbx
|
||||
blendShapeData.Vertices[i].NormalDelta = delta;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
#include "Engine/Tools/TextureTool/TextureTool.h"
|
||||
#include "Engine/ContentImporters/AssetsImportingManager.h"
|
||||
#include "Engine/ContentImporters/CreateMaterial.h"
|
||||
#include "ThirdParty/meshoptimizer/meshoptimizer.h"
|
||||
#include "Editor/Utilities/EditorUtilities.h"
|
||||
#include <ThirdParty/meshoptimizer/meshoptimizer.h>
|
||||
|
||||
void RemoveNamespace(String& name)
|
||||
{
|
||||
@@ -486,6 +487,11 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options opt
|
||||
if (autoImportOutput.IsEmpty() || (data.Types & ImportDataTypes::Textures) == 0 || texture.FilePath.IsEmpty())
|
||||
continue;
|
||||
auto filename = StringUtils::GetFileNameWithoutExtension(texture.FilePath);
|
||||
for (int32 j = filename.Length() - 1; j >= 0; j--)
|
||||
{
|
||||
if (EditorUtilities::IsInvalidPathChar(filename[j]))
|
||||
filename[j] = ' ';
|
||||
}
|
||||
if (importedFileNames.Contains(filename))
|
||||
{
|
||||
int32 counter = 1;
|
||||
@@ -526,6 +532,11 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options opt
|
||||
if (autoImportOutput.IsEmpty() || (data.Types & ImportDataTypes::Materials) == 0 || !material.UsesProperties())
|
||||
continue;
|
||||
auto filename = material.Name;
|
||||
for (int32 j = filename.Length() - 1; j >= 0; j--)
|
||||
{
|
||||
if (EditorUtilities::IsInvalidPathChar(filename[j]))
|
||||
filename[j] = ' ';
|
||||
}
|
||||
if (importedFileNames.Contains(filename))
|
||||
{
|
||||
int32 counter = 1;
|
||||
@@ -1131,7 +1142,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options opt
|
||||
dstLod.Meshes.RemoveAt(i--);
|
||||
}
|
||||
|
||||
LOG(Info, "Generated LOD{0}: triangles: {1} ({2}% of base LOD), verteces: {3} ({4}% of base LOD)",
|
||||
LOG(Info, "Generated LOD{0}: triangles: {1} ({2}% of base LOD), verticies: {3} ({4}% of base LOD)",
|
||||
lodIndex,
|
||||
lodTriangleCount, (int32)(lodTriangleCount * 100 / baseLodTriangleCount),
|
||||
lodVertexCount, (int32)(lodVertexCount * 100 / baseLodVertexCount));
|
||||
|
||||
Reference in New Issue
Block a user