You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902 #ROBOMERGE-BOT: (v613-10869866) [CL 10870584 by ryan durand in Main branch]
51 lines
1.2 KiB
C++
51 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "DatasmithFacadeActorMesh.h"
|
|
|
|
|
|
FDatasmithFacadeActorMesh::FDatasmithFacadeActorMesh(
|
|
const TCHAR* InElementName,
|
|
const TCHAR* InElementLabel
|
|
) :
|
|
FDatasmithFacadeActor(InElementName, InElementLabel)
|
|
{
|
|
}
|
|
|
|
void FDatasmithFacadeActorMesh::SetMesh(
|
|
const TCHAR* InMeshName
|
|
)
|
|
{
|
|
MeshName = InMeshName;
|
|
|
|
// Prevent the Datasmith mesh actor from being removed by optimization.
|
|
KeepActor();
|
|
}
|
|
|
|
TSharedPtr<IDatasmithActorElement> FDatasmithFacadeActorMesh::CreateActorHierarchy(
|
|
TSharedRef<IDatasmithScene> IOSceneRef
|
|
) const
|
|
{
|
|
if (MeshName.IsEmpty())
|
|
{
|
|
// Create and initialize a Datasmith actor hierarchy.
|
|
return FDatasmithFacadeActor::CreateActorHierarchy(IOSceneRef);
|
|
}
|
|
else
|
|
{
|
|
// Create a Datasmith mesh actor element.
|
|
TSharedPtr<IDatasmithMeshActorElement> MeshActorPtr = FDatasmithSceneFactory::CreateMeshActor(*ElementName);
|
|
|
|
// Set the Datasmith mesh actor base properties.
|
|
SetActorProperties(IOSceneRef, MeshActorPtr);
|
|
|
|
// Set the static mesh used by the Datasmith mesh actor.
|
|
MeshActorPtr->SetStaticMeshPathName(*MeshName);
|
|
|
|
// Add the hierarchy of children to the Datasmith actor.
|
|
AddActorChildren(IOSceneRef, MeshActorPtr);
|
|
|
|
return MeshActorPtr;
|
|
}
|
|
}
|
|
|