DatasmithSceneExporter.h
1 // Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
2 
3 #pragma once
4 
5 #include "DatasmithTypes.h"
6 #include "IDatasmithSceneElements.h"
7 #include "DatasmithUtils.h"
8 
9 #include "Math/Color.h"
10 #include "Templates/SharedPointer.h"
11 #include "Templates/UniquePtr.h"
12 
13 class FDatasmithLogger;
15 class FDatasmithSceneExporterImpl;
16 
17 /**
18  * This is the export for a DatasmithScene. Call PreExport, then Export to finish the export process.
19  */
20 class DATASMITHEXPORTER_API FDatasmithSceneExporter
21 {
22 public:
25 
26  /**
27  * Indicates that we're starting the export process. Starts the export metrics.
28  */
29  void PreExport();
30 
31  /**
32  * Exports the entire scene.
33  * It will create the scene file as well as the resized textures (in case of resize is enabled).
34  *
35  * @param bCleanupUnusedElements Remove unused meshes, textures and materials before exporting
36  */
37  void Export( TSharedRef< IDatasmithScene > DatasmithScene, bool bCleanupUnusedElements = true );
38 
39  /** Resets all the settings on the scene */
40  void Reset();
41 
42  /** Sets the progress manager for visual feedback on exporting */
43  void SetProgressManager( const TSharedPtr< IDatasmithProgressManager >& InProgressManager );
44 
45  /** Sets the logger to store the summary of the export process */
46  void SetLogger( const TSharedPtr< FDatasmithLogger >& InLogger );
47 
48  /** Sets the name of the scene to export. The resulting file and folder will use this name. */
49  void SetName(const TCHAR* InName);
50 
51  /**
52  * Sets the output path to where this scene will be exporter.
53  */
54  void SetOutputPath(const TCHAR* InOutputPath);
55  const TCHAR* GetOutputPath() const;
56 
57  /**
58  * Gets the path to the assets output folder. This is where we output the mesh files, textures, etc.
59  */
60  const TCHAR* GetAssetsOutputPath() const;
61 
62 private:
63  TUniquePtr< FDatasmithSceneExporterImpl > Impl;
64 };
FDatasmithSceneExporter
This is the export for a DatasmithScene.
Definition: DatasmithSceneExporter.h:20
FDatasmithLogger
Logger that holds the errors during the export process.
Definition: DatasmithLogger.h:13
IDatasmithProgressManager
Interface that is called during export time to update the progression.
Definition: DatasmithProgressManager.h:11