Files
UnrealEngine/Engine/Plugins/Experimental/ChaosFlesh/Source/ChaosFleshNodes/Private/Dataflow/ChaosFleshGetFleshAssetNode.cpp
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

32 lines
921 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Dataflow/ChaosFleshGetFleshAssetNode.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(ChaosFleshGetFleshAssetNode)
void FGetFleshAssetDataflowNode::Evaluate(UE::Dataflow::FContext& Context, const FDataflowOutput* Out) const
{
if (Out->IsA<FManagedArrayCollection>(&Output))
{
FManagedArrayCollection Collection;
SetValue(Context, MoveTemp(Collection), &Output);
const UFleshAsset* FleshAssetValue = FleshAsset;
if (!FleshAssetValue)
{
if (const UE::Dataflow::FEngineContext* EngineContext = Context.AsType<UE::Dataflow::FEngineContext>())
{
FleshAssetValue = Cast<UFleshAsset>(EngineContext->Owner);
}
}
if (FleshAssetValue)
{
if (TSharedPtr<const FFleshCollection> AssetCollection = FleshAssetValue->GetFleshCollection())
{
SetValue(Context, (const FManagedArrayCollection&)(*AssetCollection), &Output);
}
}
}
}