Merge remote-tracking branch 'origin/master' into 1.12
# Conflicts: # Content/Editor/Camera/M_Camera.flax # Content/Editor/CubeTexturePreviewMaterial.flax # Content/Editor/DebugMaterials/DDGIDebugProbes.flax # Content/Editor/DebugMaterials/SingleColor/Decal.flax # Content/Editor/DebugMaterials/SingleColor/Particle.flax # Content/Editor/DebugMaterials/SingleColor/Surface.flax # Content/Editor/DebugMaterials/SingleColor/SurfaceAdditive.flax # Content/Editor/DebugMaterials/SingleColor/Terrain.flax # Content/Editor/DefaultFontMaterial.flax # Content/Editor/Gizmo/FoliageBrushMaterial.flax # Content/Editor/Gizmo/Material.flax # Content/Editor/Gizmo/MaterialWire.flax # Content/Editor/Gizmo/SelectionOutlineMaterial.flax # Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax # Content/Editor/Highlight Material.flax # Content/Editor/Icons/IconsMaterial.flax # Content/Editor/IesProfilePreviewMaterial.flax # Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl # Content/Editor/Particles/Particle Material Color.flax # Content/Editor/Particles/Smoke Material.flax # Content/Editor/SpriteMaterial.flax # Content/Editor/Terrain/Circle Brush Material.flax # Content/Editor/Terrain/Highlight Terrain Material.flax # Content/Editor/TexturePreviewMaterial.flax # Content/Editor/Wires Debug Material.flax # Content/Engine/DefaultDeformableMaterial.flax # Content/Engine/DefaultMaterial.flax # Content/Engine/DefaultRadialMenu.flax # Content/Engine/DefaultTerrainMaterial.flax # Content/Engine/SingleColorMaterial.flax # Content/Engine/SkyboxMaterial.flax # Flax.flaxproj # Source/Engine/Graphics/Materials/MaterialShader.h # Source/Engine/Graphics/Materials/MaterialShaderFeatures.cpp # Source/Engine/Renderer/RenderList.h # Source/Shaders/Reflections.shader # Source/Shaders/ReflectionsCommon.hlsl # Source/Tools/Flax.Build/Bindings/BindingsGenerator.Cpp.cs
This commit is contained in:
@@ -562,6 +562,7 @@ void ModelTool::Options::Serialize(SerializeStream& stream, const void* otherObj
|
||||
SERIALIZE(CalculateBoneOffsetMatrices);
|
||||
SERIALIZE(LightmapUVsSource);
|
||||
SERIALIZE(CollisionMeshesPrefix);
|
||||
SERIALIZE(CollisionMeshesPostfix);
|
||||
SERIALIZE(CollisionType);
|
||||
SERIALIZE(PositionFormat);
|
||||
SERIALIZE(TexCoordFormat);
|
||||
@@ -616,6 +617,7 @@ void ModelTool::Options::Deserialize(DeserializeStream& stream, ISerializeModifi
|
||||
DESERIALIZE(CalculateBoneOffsetMatrices);
|
||||
DESERIALIZE(LightmapUVsSource);
|
||||
DESERIALIZE(CollisionMeshesPrefix);
|
||||
DESERIALIZE(CollisionMeshesPostfix);
|
||||
DESERIALIZE(CollisionType);
|
||||
DESERIALIZE(PositionFormat);
|
||||
DESERIALIZE(TexCoordFormat);
|
||||
@@ -1827,7 +1829,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
|
||||
}
|
||||
|
||||
// Collision mesh output
|
||||
if (options.CollisionMeshesPrefix.HasChars())
|
||||
if (options.CollisionMeshesPrefix.HasChars() || options.CollisionMeshesPostfix.HasChars())
|
||||
{
|
||||
// Extract collision meshes from the model
|
||||
ModelData collisionModel;
|
||||
@@ -1836,7 +1838,8 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
|
||||
for (int32 i = lod.Meshes.Count() - 1; i >= 0; i--)
|
||||
{
|
||||
auto mesh = lod.Meshes[i];
|
||||
if (mesh->Name.StartsWith(options.CollisionMeshesPrefix, StringSearchCase::IgnoreCase))
|
||||
if ((options.CollisionMeshesPrefix.HasChars() && mesh->Name.StartsWith(options.CollisionMeshesPrefix, StringSearchCase::IgnoreCase)) ||
|
||||
(options.CollisionMeshesPostfix.HasChars() && mesh->Name.EndsWith(options.CollisionMeshesPostfix, StringSearchCase::IgnoreCase)))
|
||||
{
|
||||
// Remove material slot used by this mesh (if no other mesh else uses it)
|
||||
int32 materialSlotUsageCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user