Files
UnrealEngineUWP/Engine/Source/Developer/Datasmith/DatasmithExporter/Public/DatasmithMeshExporter.h
benoit deschenes 452fc8eba6 Integrating CL#11259478 from Dev-Enterprise
Fixing memory leak when GC is not called in datasmith mesh exporter

#jira UE-87989
#review-11255122 JeanMichel.Dignard
#rb JeanMichel.Dignard

[CL 11461470 by benoit deschenes in 4.25 branch]
2020-02-17 13:28:11 -05:00

39 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "DatasmithExportOptions.h"
#include "Templates/SharedPointer.h"
class FDatasmithMesh;
class FDatasmithMeshExporterImpl;
class IDatasmithMeshElement;
class DATASMITHEXPORTER_API FDatasmithMeshExporter
{
public:
FDatasmithMeshExporter();
virtual ~FDatasmithMeshExporter();
/**
* Exports the DatasmithMesh as a UObject.
*
* @param Filepath The path where the resulting file will be written
* @param Filename The name of the file to export to, without any path or extension
* @param Mesh The mesh to export
* @param CollisionMesh An optional collision mesh
* @param LightmapUV The UV generation export option
*
* @return A IDatasmithMeshElement that refers to the exported file
*/
TSharedPtr< IDatasmithMeshElement > ExportToUObject( const TCHAR* Filepath, const TCHAR* Filename, FDatasmithMesh& Mesh, FDatasmithMesh* CollisionMesh, EDSExportLightmapUV LightmapUV );
/**
* @return The error that happened during the last export, if any
*/
FString GetLastError() const;
private:
FDatasmithMeshExporterImpl* Impl;
};