2019-12-26 15:32:37 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
2019-10-04 13:11:45 -04:00
# pragma once
2022-07-20 12:03:45 -04:00
# include "CoreTypes.h"
2019-10-04 13:11:45 -04:00
# include "DatasmithTypes.h"
# include "DatasmithUtils.h"
2022-07-20 12:03:45 -04:00
# include "IDatasmithSceneElements.h"
2019-10-04 13:11:45 -04:00
# include "Math/Color.h"
# include "Templates/SharedPointer.h"
# include "Templates/UniquePtr.h"
class FDatasmithLogger ;
class FDatasmithSceneExporterImpl ;
2022-07-20 12:03:45 -04:00
class IDatasmithProgressManager ;
class IDatasmithScene ;
2019-10-04 13:11:45 -04:00
/**
* This is the export for a DatasmithScene . Call PreExport , then Export to finish the export process .
*/
class DATASMITHEXPORTER_API FDatasmithSceneExporter
{
public :
FDatasmithSceneExporter ( ) ;
~ FDatasmithSceneExporter ( ) ;
/**
* Indicates that we ' re starting the export process . Starts the export metrics .
*/
void PreExport ( ) ;
/**
* Exports the entire scene .
* It will create the scene file as well as the resized textures ( in case of resize is enabled ) .
*
* @ param bCleanupUnusedElements Remove unused meshes , textures and materials before exporting
*/
void Export ( TSharedRef < IDatasmithScene > DatasmithScene , bool bCleanupUnusedElements = true ) ;
/** Resets all the settings on the scene */
2022-04-05 10:39:18 -04:00
UE_DEPRECATED ( 5.1 , " This function was selectively reseting the export state and was preserving the export paths. We should now directly set the fields we want to change instead. " )
2019-10-04 13:11:45 -04:00
void Reset ( ) ;
/** Sets the progress manager for visual feedback on exporting */
void SetProgressManager ( const TSharedPtr < IDatasmithProgressManager > & InProgressManager ) ;
/** Sets the logger to store the summary of the export process */
void SetLogger ( const TSharedPtr < FDatasmithLogger > & InLogger ) ;
2020-06-23 18:40:00 -04:00
2019-10-04 13:11:45 -04:00
/** Sets the name of the scene to export. The resulting file and folder will use this name. */
void SetName ( const TCHAR * InName ) ;
2021-02-03 14:57:28 -04:00
/** Gets the name of the scene to export. */
const TCHAR * GetName ( ) const ;
2020-06-23 18:40:00 -04:00
/**
* Sets the output path to where this scene will be exported .
2019-10-04 13:11:45 -04:00
*/
void SetOutputPath ( const TCHAR * InOutputPath ) ;
const TCHAR * GetOutputPath ( ) const ;
2020-06-23 18:40:00 -04:00
/**
2019-10-04 13:11:45 -04:00
* Gets the path to the assets output folder . This is where we output the mesh files , textures , etc .
*/
const TCHAR * GetAssetsOutputPath ( ) const ;
private :
TUniquePtr < FDatasmithSceneExporterImpl > Impl ;
} ;