Skip to content

Commit 83f583c

Browse files
committed
Fixed an issue where landscape splines would not be recooked correctly.
1 parent e647289 commit 83f583c

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Source/HoudiniEngine/Private/HoudiniLandscapeSplineTranslator.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -644,13 +644,6 @@ FHoudiniLandscapeSplineTranslator::CreateOutputLandscapeSplinesFromHoudiniGeoPar
644644
HOUDINI_LOG_WARNING(TEXT("Landscape Spline Output is only supported in UE5.1+"));
645645
return false;
646646
#else
647-
// If we're not forcing the rebuild then only recreate if the HGPO is marked has changed.
648-
if (!bInForceRebuild && (!InHGPO.bHasGeoChanged || !InHGPO.bHasPartChanged))
649-
{
650-
// Simply reuse the existing splines
651-
OutputSplines = InCurrentSplines;
652-
return true;
653-
}
654647

655648
if (!IsValid(InWorld))
656649
return false;

Source/HoudiniEngineRuntime/Private/HoudiniOutput.cpp

+12-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ UHoudiniLandscapeSplinesOutput::GetLayerSegments(const FName InEditLayer, TArray
114114

115115

116116
void
117-
UHoudiniLandscapeSplinesOutput::Clear(const bool bInClearTempLayers)
117+
UHoudiniLandscapeSplinesOutput::Clear(bool bInClearTempLayers)
118118
{
119119
// Delete the splines (segments and control points)
120120
FHoudiniLandscapeRuntimeUtils::DestroyLandscapeSplinesSegmentsAndControlPoints(this);
@@ -1351,6 +1351,17 @@ void FHoudiniOutputObject::DestroyCookedData()
13511351
SceneComponent->DestroyComponent();
13521352
}
13531353

1354+
//--------------------------------------------------------------------------------------------------------------------
1355+
// Remove spline output
1356+
//--------------------------------------------------------------------------------------------------------------------
1357+
1358+
// Destroy any segments that we previously created
1359+
UHoudiniLandscapeSplinesOutput* SplinesOutputObject = Cast<UHoudiniLandscapeSplinesOutput>(this->OutputObject);
1360+
if (IsValid(SplinesOutputObject))
1361+
{
1362+
SplinesOutputObject->Clear();
1363+
}
1364+
13541365
//--------------------------------------------------------------------------------------------------------------------
13551366
// Destroy all objects
13561367
//--------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)