From bce0be7e49360d425790c393014410f9f5e17ff2 Mon Sep 17 00:00:00 2001 From: Damien Pernuit Date: Tue, 9 Jul 2024 19:31:10 -0400 Subject: [PATCH] - Fixed non editor build error --- Source/HoudiniEngine/Private/HoudiniEngineManager.cpp | 9 ++++++++- .../Private/HoudiniLandscapeSplineTranslator.cpp | 2 ++ .../HoudiniEngine/Private/HoudiniParameterTranslator.cpp | 4 ++++ .../Private/HoudiniAssetComponent.cpp | 3 +-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Source/HoudiniEngine/Private/HoudiniEngineManager.cpp b/Source/HoudiniEngine/Private/HoudiniEngineManager.cpp index 17c1b1e30c..a4e6a1c42d 100755 --- a/Source/HoudiniEngine/Private/HoudiniEngineManager.cpp +++ b/Source/HoudiniEngine/Private/HoudiniEngineManager.cpp @@ -354,7 +354,7 @@ FHoudiniEngineManager::Tick(float DeltaTime) // Update the tick time for this component CurrentComponent->LastTickTime = dNow; } - +#if WITH_EDITORONLY_DATA // See if we need to update this HDA's details panel if (CurrentComponent->bNeedToUpdateEditorProperties) { @@ -363,6 +363,7 @@ FHoudiniEngineManager::Tick(float DeltaTime) FHoudiniEngineUtils::UpdateEditorProperties(true); CurrentComponent->bNeedToUpdateEditorProperties = false; } +#endif } // Handle Asset delete @@ -490,9 +491,11 @@ FHoudiniEngineManager::ProcessComponent(UHoudiniAssetComponent* HAC) // Refresh UI when pause cooking if (!FHoudiniEngine::Get().HasUIFinishRefreshingWhenPausingCooking()) { +#if WITH_EDITORONLY_DATA // Trigger a details panel update if the Houdini asset actor is selected if (HAC->IsOwnerSelected()) HAC->bNeedToUpdateEditorProperties = true; +#endif // Finished refreshing UI of one HDA. FHoudiniEngine::Get().RefreshUIDisplayedWhenPauseCooking(); @@ -660,8 +663,10 @@ FHoudiniEngineManager::ProcessComponent(UHoudiniAssetComponent* HAC) if(!bCookStarted) { +#if WITH_EDITORONLY_DATA // Just refresh editor properties? HAC->bNeedToUpdateEditorProperties = true; +#endif // TODO: Check! update state? HAC->SetAssetState(EHoudiniAssetState::None); @@ -1307,8 +1312,10 @@ FHoudiniEngineManager::PostCook(UHoudiniAssetComponent* HAC, const bool& bSucces FHoudiniEngine::Get().UpdateCookingNotification(FText::FromString(DisplayName + " :\nFinished processing outputs"), true); +#if WITH_EDITORONLY_DATA // Indicate we want to trigger a details panel update HAC->bNeedToUpdateEditorProperties = true; +#endif // If any outputs have HoudiniStaticMeshes, and if timer based refinement is enabled on the HAC, // set the RefineMeshesTimer and ensure BuildStaticMeshesForAllHoudiniStaticMeshes is bound to diff --git a/Source/HoudiniEngine/Private/HoudiniLandscapeSplineTranslator.cpp b/Source/HoudiniEngine/Private/HoudiniLandscapeSplineTranslator.cpp index a7c3950015..dc37323e81 100644 --- a/Source/HoudiniEngine/Private/HoudiniLandscapeSplineTranslator.cpp +++ b/Source/HoudiniEngine/Private/HoudiniLandscapeSplineTranslator.cpp @@ -408,8 +408,10 @@ FHoudiniLandscapeSplineTranslator::ProcessLandscapeSplineOutput( // saves the level. InOutput->MarkPackageDirty(); +#if WITH_EDITORONLY_DATA if(IsValid(HAC) && HAC->IsOwnerSelected()) HAC->bNeedToUpdateEditorProperties = true; +#endif return true; } diff --git a/Source/HoudiniEngine/Private/HoudiniParameterTranslator.cpp b/Source/HoudiniEngine/Private/HoudiniParameterTranslator.cpp index 1f8ad51514..aa0858c8ac 100755 --- a/Source/HoudiniEngine/Private/HoudiniParameterTranslator.cpp +++ b/Source/HoudiniEngine/Private/HoudiniParameterTranslator.cpp @@ -104,8 +104,10 @@ FHoudiniParameterTranslator::UpdateParameters(UHoudiniAssetComponent* HAC) // Replace with the new parameters HAC->Parameters = NewParameters; +#if WITH_EDITORONLY_DATA // Indicate we want to update the details panel after the parameter changes/updates HAC->bNeedToUpdateEditorProperties = true; +#endif } @@ -216,8 +218,10 @@ FHoudiniParameterTranslator::UpdateLoadedParameters(UHoudiniAssetComponent* HAC) // Simply replace with the new parameters HAC->Parameters = NewParameters; +#if WITH_EDITORONLY_DATA // Indicate we want to update the details panel after the parameter changes/updates HAC->bNeedToUpdateEditorProperties = true; +#endif } return true; diff --git a/Source/HoudiniEngineRuntime/Private/HoudiniAssetComponent.cpp b/Source/HoudiniEngineRuntime/Private/HoudiniAssetComponent.cpp index 3ce2f697ad..b78ece3f05 100755 --- a/Source/HoudiniEngineRuntime/Private/HoudiniAssetComponent.cpp +++ b/Source/HoudiniEngineRuntime/Private/HoudiniAssetComponent.cpp @@ -238,6 +238,7 @@ UHoudiniAssetComponent::UHoudiniAssetComponent(const FObjectInitializer & Object bReplacePreviousBake = false; ActorBakeOption = EHoudiniEngineActorBakeOption::OneActorPerComponent; bAllowPlayInEditorRefinement = false; + bNeedToUpdateEditorProperties = false; #endif // @@ -263,8 +264,6 @@ UHoudiniAssetComponent::UHoudiniAssetComponent(const FObjectInitializer & Object // Initialize the default SM Build settings with the plugin's settings default values StaticMeshBuildSettings = FHoudiniEngineRuntimeUtils::GetDefaultMeshBuildSettings(); - - bNeedToUpdateEditorProperties = false; } UHoudiniAssetComponent::~UHoudiniAssetComponent()