Files
UnrealEngineUWP/Engine/Source/Developer/Datasmith/DatasmithExporter/Public/DatasmithMeshExporter.h
JeanMichel Dignard d4f0f4d3f2 Copying //UE4/Dev-Enterprise @ cl 9420543 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 9420574 by JeanMichel Dignard in Main branch]
2019-10-04 13:11:45 -04:00

42 lines
1.4 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "DatasmithExportOptions.h"
#include "Templates/SharedPointer.h"
class FDatasmithMesh;
class FDatasmithMeshExporterImpl;
class IDatasmithMeshElement;
struct FMeshDescription;
class DATASMITHEXPORTER_API FDatasmithMeshExporter
{
public:
/**
* 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 { return LastError; }
private:
void PreExport( FDatasmithMesh& DatasmithMesh, const TCHAR* Filepath, const TCHAR* Filename, EDSExportLightmapUV LightmapUV );
void PostExport( const FDatasmithMesh& DatasmithMesh, TSharedRef< IDatasmithMeshElement > MeshElement );
void CreateDefaultUVs( FDatasmithMesh& DatasmithMesh );
void RegisterStaticMeshAttributes( FMeshDescription& MeshDescription);
FString LastError;
};