You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Added nodes to append a skeleton to the geometry collection. #rb none #fyi cedric.caillaud #preflight 632b46c8e23e50651beea2a3 [CL 22117623 by Brice Criswell in ue5-main branch]
35 lines
1.0 KiB
C++
35 lines
1.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Dataflow/GeometryCollectionSkeletalMeshNodes.h"
|
|
|
|
#include "Engine/SkeletalMesh.h"
|
|
#include "GeometryCollection/GeometryCollectionObject.h"
|
|
#include "GeometryCollection/ManagedArrayCollection.h"
|
|
#include "GeometryCollection/GeometryCollection.h"
|
|
#include "GeometryCollection/GeometryCollectionEngineConversion.h"
|
|
|
|
|
|
namespace Dataflow
|
|
{
|
|
void GeometryCollectionSkeletalMeshNodes()
|
|
{
|
|
DATAFLOW_NODE_REGISTER_CREATION_FACTORY(FSkeletonToCollectionDataflowNode);
|
|
}
|
|
}
|
|
|
|
void FSkeletonToCollectionDataflowNode::Evaluate(Dataflow::FContext& Context, const FDataflowOutput* Out) const
|
|
{
|
|
if (Out->IsA<DataType>(&Collection))
|
|
{
|
|
DataType OutCollection;
|
|
TObjectPtr<const USkeleton> SkeletonValue = GetValue<TObjectPtr<const USkeleton>>(Context, &Skeleton);
|
|
if (SkeletonValue)
|
|
{
|
|
FGeometryCollectionEngineConversion::AppendSkeleton(SkeletonValue.Get(), FTransform::Identity, &OutCollection);
|
|
}
|
|
SetValue<DataType>(Context, OutCollection, &Collection);
|
|
}
|
|
}
|
|
|
|
|