Merge branch 'master' into Improve-HighlightedPopUpColor
This commit is contained in:
@@ -668,7 +668,11 @@ void AnimatedModel::RunBlendShapeDeformer(const MeshBase* mesh, MeshDeformationD
|
||||
{
|
||||
if (q.First == blendShape.Name)
|
||||
{
|
||||
const float weight = q.Second * blendShape.Weight;
|
||||
float weight = q.Second;
|
||||
if (!Math::IsZero(blendShape.Weight))
|
||||
weight *= blendShape.Weight;
|
||||
if (Math::IsZero(weight))
|
||||
break;
|
||||
blendShapes.Add(Pair<const BlendShape&, const float>(blendShape, weight));
|
||||
minVertexIndex = Math::Min(minVertexIndex, blendShape.MinVertexIndex);
|
||||
maxVertexIndex = Math::Max(maxVertexIndex, blendShape.MaxVertexIndex);
|
||||
|
||||
@@ -2787,7 +2787,8 @@ float PhysicsBackend::ComputeShapeSqrDistanceToPoint(void* shape, const Vector3&
|
||||
#if USE_LARGE_WORLDS
|
||||
PxVec3 closestPointPx;
|
||||
float result = PxGeometryQuery::pointDistance(C2P(point), shapePhysX->getGeometry(), trans, &closestPointPx);
|
||||
*closestPoint = P2C(closestPointPx);
|
||||
if (closestPoint)
|
||||
*closestPoint = P2C(closestPointPx);
|
||||
return result;
|
||||
#else
|
||||
return PxGeometryQuery::pointDistance(C2P(point), shapePhysX->getGeometry(), trans, (PxVec3*)closestPoint);
|
||||
|
||||
@@ -770,6 +770,11 @@ namespace Flax.Build.Bindings
|
||||
genericArgs += ", " + typeInfo.GenericArgs[1];
|
||||
result = $"Array<{genericArgs}>({result})";
|
||||
}
|
||||
else if (arrayApiType?.Name == "bool")
|
||||
{
|
||||
type = "bool*";
|
||||
result = "Array<bool>({0}, {1})";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -925,7 +930,7 @@ namespace Flax.Build.Bindings
|
||||
|
||||
// BytesContainer
|
||||
if (typeInfo.Type == "BytesContainer" && typeInfo.GenericArgs == null)
|
||||
return "MUtils::ToArray({0})";
|
||||
return $"MUtils::ToArray({value})";
|
||||
|
||||
// Construct native typename for MUtils template argument
|
||||
var nativeType = new StringBuilder(64);
|
||||
@@ -1244,8 +1249,12 @@ namespace Flax.Build.Bindings
|
||||
callParams += ", ";
|
||||
separator = true;
|
||||
var name = parameterInfo.Name;
|
||||
var countParamName = $"__{parameterInfo.Name}Count";
|
||||
if (CppParamsThatNeedConversion[i] && (!FindApiTypeInfo(buildData, parameterInfo.Type, caller)?.IsStruct ?? false))
|
||||
{
|
||||
name = '*' + name;
|
||||
countParamName = '*' + countParamName;
|
||||
}
|
||||
|
||||
string param = string.Empty;
|
||||
if (string.IsNullOrWhiteSpace(CppParamsWrappersCache[i]))
|
||||
@@ -1258,7 +1267,7 @@ namespace Flax.Build.Bindings
|
||||
else
|
||||
{
|
||||
// Convert value
|
||||
param += string.Format(CppParamsWrappersCache[i], name);
|
||||
param += string.Format(CppParamsWrappersCache[i], name, countParamName);
|
||||
}
|
||||
|
||||
// Special case for output result parameters that needs additional converting from native to managed format (such as non-POD structures or output array parameter)
|
||||
|
||||
@@ -241,7 +241,11 @@ namespace Flax.Deploy
|
||||
|
||||
if (!File.Exists(solutionFile))
|
||||
{
|
||||
throw new Exception(string.Format("Unable to build solution {0}. Solution file not found.", solutionFile));
|
||||
// CMake VS2026 generator prefers .slnx solution files, just swap the extension for CMake dependencies
|
||||
if (File.Exists(Path.ChangeExtension(solutionFile, "slnx")))
|
||||
solutionFile = Path.ChangeExtension(solutionFile, "slnx");
|
||||
else
|
||||
throw new Exception(string.Format("Unable to build solution {0}. Solution file not found.", solutionFile));
|
||||
}
|
||||
|
||||
string cmdLine = string.Format("\"{0}\" /m /t:Restore,Build /p:Configuration=\"{1}\" /p:Platform=\"{2}\" {3} /nologo", solutionFile, buildConfig, buildPlatform, Verbosity);
|
||||
|
||||
@@ -47,6 +47,24 @@ namespace Flax.Deps
|
||||
/// </summary>
|
||||
protected static TargetPlatform BuildPlatform => Platform.BuildPlatform.Target;
|
||||
|
||||
|
||||
private static Version? _cmakeVersion;
|
||||
protected static Version CMakeVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_cmakeVersion == null)
|
||||
{
|
||||
var versionOutput = Utilities.ReadProcessOutput("cmake", "--version");
|
||||
var versionStart = versionOutput.IndexOf("cmake version ") + "cmake version ".Length;
|
||||
var versionEnd = versionOutput.IndexOfAny(['-', '\n', '\r'], versionStart); // End of line or dash before Git hash
|
||||
var versionString = versionOutput.Substring(versionStart, versionEnd - versionStart);
|
||||
_cmakeVersion = new Version(versionString);
|
||||
}
|
||||
return _cmakeVersion;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the platforms list supported by this dependency to build on the current build platform (based on <see cref="Platform.BuildPlatform"/>).
|
||||
/// </summary>
|
||||
@@ -309,7 +327,13 @@ namespace Flax.Deps
|
||||
break;
|
||||
default: throw new InvalidArchitectureException(architecture);
|
||||
}
|
||||
cmdLine = string.Format("CMakeLists.txt -G \"Visual Studio 17 2022\" -A {0}", arch);
|
||||
if (CMakeVersion.Major > 4 || (CMakeVersion.Major == 4 && CMakeVersion.Minor >= 2))
|
||||
{
|
||||
// This generates both .sln and .slnx solution files
|
||||
cmdLine = string.Format("CMakeLists.txt -G \"Visual Studio 17 2022\" -G \"Visual Studio 18 2026\" -A {0}", arch);
|
||||
}
|
||||
else
|
||||
cmdLine = string.Format("CMakeLists.txt -G \"Visual Studio 17 2022\" -A {0}", arch);
|
||||
break;
|
||||
}
|
||||
case TargetPlatform.PS4:
|
||||
|
||||
Reference in New Issue
Block a user