Files
UnrealEngineUWP/Engine/Source/Developer/Datasmith/DatasmithExporter/Public/DatasmithSceneExporter.h
benoit deschenes afde922bf1 DatasmithExporter - Fixing Rhino and Revit broken export (no export in Rhino, bad mesh scaling in Rhino & Revit)
- Restoring previous FDatasmithSceneExporter::Reset() behavior but marking the function as deprecated.
It's previous usage of reseting the export progress without resetting the whole exporter state was discutable and confusing. If users want to fully reset the exporter they don't need the Reset() function.

- Fixing Datasmith Facade inverse scaling error during position conversion

#preflight 624b48d9dc6183e3f547d3b1
#rb Johan.Duparc Kerim.Borchaev

[CL 19625080 by benoit deschenes in ue5-main branch]
2022-04-05 10:39:18 -04:00

69 lines
2.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "DatasmithTypes.h"
#include "IDatasmithSceneElements.h"
#include "DatasmithUtils.h"
#include "Math/Color.h"
#include "Templates/SharedPointer.h"
#include "Templates/UniquePtr.h"
class FDatasmithLogger;
class IDatasmithProgressManager;
class FDatasmithSceneExporterImpl;
/**
* 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 */
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.")
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 );
/** Sets the name of the scene to export. The resulting file and folder will use this name. */
void SetName(const TCHAR* InName);
/** Gets the name of the scene to export. */
const TCHAR* GetName() const;
/**
* Sets the output path to where this scene will be exported.
*/
void SetOutputPath(const TCHAR* InOutputPath);
const TCHAR* GetOutputPath() const;
/**
* 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;
};