You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
MeshModelingTools: Make CollectSurfacePathMechanic remove preview vertex if there isn't currently a valid one.
#rb Rinat.Abdrashitov #rnx #jira UE-118031 #preflight 61e0a3c5797757aace8bd7ff #ROBOMERGE-AUTHOR: semion.piskarev #ROBOMERGE-SOURCE: CL 18621566 in //UE5/Release-5.0/... via CL 18621612 via CL 18621664 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669) [CL 18621720 by semion piskarev in ue5-main branch]
This commit is contained in:
@@ -54,9 +54,12 @@ void UCollectSurfacePathMechanic::Render(IToolsContextRenderAPI* RenderAPI)
|
||||
|
||||
if (!bGeometricCloseOccurred)
|
||||
{
|
||||
// This draws the line to the current hover point as a preview
|
||||
const FLinearColor& DrawPreviewColor = (bCurrentPreviewWillComplete || bGeometricCloseOccurred) ? PathCompleteColor : PreviewColor;
|
||||
PathDrawer.DrawLine(HitPath[NumPoints].Origin, PreviewPathPoint.Origin, DrawPreviewColor);
|
||||
if (bPreviewPathPointValid)
|
||||
{
|
||||
// This draws the line to the current hover point as a preview
|
||||
const FLinearColor& DrawPreviewColor = (bCurrentPreviewWillComplete || bGeometricCloseOccurred) ? PathCompleteColor : PreviewColor;
|
||||
PathDrawer.DrawLine(HitPath[NumPoints].Origin, PreviewPathPoint.Origin, DrawPreviewColor);
|
||||
}
|
||||
}
|
||||
else if (LoopWasClosed())
|
||||
{
|
||||
@@ -65,7 +68,7 @@ void UCollectSurfacePathMechanic::Render(IToolsContextRenderAPI* RenderAPI)
|
||||
}
|
||||
}
|
||||
|
||||
if (!bGeometricCloseOccurred)
|
||||
if (!bGeometricCloseOccurred && bPreviewPathPointValid)
|
||||
{
|
||||
PathDrawer.DrawPoint(PreviewPathPoint.Origin, PreviewColor, PathDrawer.PointSize, PathDrawer.bDepthTested);
|
||||
}
|
||||
@@ -121,7 +124,8 @@ bool UCollectSurfacePathMechanic::IsHitByRay(const FRay3d& Ray, FFrame3d& HitPoi
|
||||
bool UCollectSurfacePathMechanic::UpdatePreviewPoint(const FRay3d& Ray)
|
||||
{
|
||||
FFrame3d PreviewPoint;
|
||||
if ( RayToPathPoint(Ray, PreviewPoint, true ) == false)
|
||||
bPreviewPathPointValid = RayToPathPoint(Ray, PreviewPoint, true);
|
||||
if (!bPreviewPathPointValid)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
TArray<FFrame3d> HitPath;
|
||||
|
||||
FFrame3d PreviewPathPoint;
|
||||
|
||||
bool bPreviewPathPointValid = false;
|
||||
|
||||
FToolDataVisualizer PathDrawer;
|
||||
FLinearColor PathColor;
|
||||
|
||||
Reference in New Issue
Block a user