Navigation
API > API/Plugins > API/Plugins/DatasmithImporter
References
| Module | DatasmithImporter |
| Header | /Engine/Plugins/Enterprise/DatasmithImporter/Source/DatasmithImporter/Public/DatasmithImportContext.h |
| Include | #include "DatasmithImportContext.h" |
Syntax
struct FDatasmithImportContext
Variables
| Type | Name | Description | |
|---|---|---|---|
| FDatasmithActorImportContext | ActorsContext | Actors specific import context | |
| TArray< TObjectPtr< UDatasmithOptionsBase > > | AdditionalImportOptions | Per-Translator settings related to the import of a Datasmith scene | |
| FDatasmithAssetsImportContext | AssetsContext | Assets specific import context | |
| bool | bImportedViaScript | ||
| bool | bIsAReimport | ||
| TAtomic< bool > | bUserCancelled | Indicates if the user has canceled the import process | |
| TSharedPtr< void > | ContextExtension | Generic extension | |
| FFeedbackContext * | FeedbackContext | Feedback context provided by ImportFactory. Used to display import progress | |
| FMD5Hash | FileHash | Cached MD5 hash value for faster processing | |
| TSharedPtr< IDatasmithScene > | FilteredScene | IDatasmithScene object filtered with only what will actually go through the import process | |
| TArray< USceneComponent * > | Hierarchy | Stack of parent components we're currently importing under | |
| TMap< TSharedRef< IDatasmithClothElement >, TObjectPtr< UObject > > | ImportedClothes | ||
| TArray< UObject * > | ImportedClothPresets | ||
| TMap< TSharedRef< IDatasmithLevelSequenceElement >, TObjectPtr< ULevelSequence > > | ImportedLevelSequences | Map of imported level sequences for each level sequence element | |
| TMap< TSharedRef< IDatasmithLevelVariantSetsElement >, TObjectPtr< ULevelVariantSets > > | ImportedLevelVariantSets | Map of imported level variant sets for each level variant set element | |
| TMap< TSharedRef< IDatasmithBaseMaterialElement >, UMaterialFunction * > | ImportedMaterialFunctions | Map of imported material function for each material element, they are only imported as a per-required basis | |
| TMap< FString, TSharedRef< IDatasmithBaseMaterialElement > > | ImportedMaterialFunctionsByName | Register IDatasmithMeshElement by their name so they can be searched faster | |
| TMap< TSharedRef< IDatasmithBaseMaterialElement >, TObjectPtr< UMaterialInterface > > | ImportedMaterials | Map of imported material for each material element | |
| TMap< uint32, TObjectPtr< UMaterialInterface > > | ImportedParentMaterials | List of potential parent materials with their hash. Used to create material instances from. | |
| TMap< TSharedRef< IDatasmithMeshElement >, TObjectPtr< UStaticMesh > > | ImportedStaticMeshes | Map of imported mesh for each mesh element | |
| TMap< FString, TSharedRef< IDatasmithMeshElement > > | ImportedStaticMeshesByName | Register IDatasmithMeshElement by their name so they can be searched faster | |
| TMap< TSharedRef< IDatasmithTextureElement >, UE::Interchange::FAssetImportResultRef > | ImportedTextures | Map of imported texture for each texture element | |
| EObjectFlags | ObjectFlags | Object flags to apply to newly imported objects | |
| TObjectPtr< UDatasmithImportOptions > | Options | Settings related to the import of a Datasmith scene | |
| TSet< FString > | ParsedIesFiles | List of previously parsed IES files | |
| TSharedPtr< IDatasmithScene > | Scene | IDatasmithScene object requested to be imported to UE editor | |
| TObjectPtr< UDatasmithScene > | SceneAsset | Scene asset | |
| FString | SceneName | Name of the scene being created | |
| TSharedPtr< IDatasmithTranslator > | SceneTranslator | Name of the scene being created |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FDatasmithImportContext
(
const TSharedPtr< UE::DatasmithImporter::FExternalSource >& InExternalSource, |
|||
FDatasmithImportContext
(
const FString& InFileName, |
Please use constructor using ExternalSource |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddImportedActor
(
AActor* InActor |
Add newly created Actor to context's map | |
| void | AddSceneComponent
(
const FString& InName, |
Add newly created SceneComponent to context's map | |
| void | Displays all the messages that were added through AddMessage in the MessageLogModule | ||
| TArray< AActor * > | |||
| bool | Init
(
const FString& InImportPath, |
Initialize members required before loading anything, must call InitScene() independendly when using this function. | |
| bool | InitOptions
(
const TSharedPtr< FJsonObject >& ImportSettingsJson, |
First part of the Init process, requires a call to SetupDestination and InitScene after that. | |
| void | InitScene
(
const TSharedRef< IDatasmithScene >& InScene |
Set the scene and initialize related members. Should be called before starting the import process. | |
| TSharedRef< FTokenizedMessage > | Push messages for display to the end-user | ||
| TSharedRef< FTokenizedMessage > | |||
| TSharedRef< FTokenizedMessage > | LogWarning
(
const FText& InWarningMessage, |
||
| bool | SetupDestination
(
const FString& InImportPath, |
Second part of the Init process, replaces Init, requires a call to InitOptions before that. | |
| bool | |||
| void | UpdateImportOption
(
UDatasmithOptionsBase* Option |
Replace or add options based on it's UClass. |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
FDatasmithImportContext
(
const FString& InFileName, |
Please use constructor using ExternalSource | ||
| bool | Init
(
TSharedRef< IDatasmithScene > InScene, |
The options initialization should not require a scene. Please use other implemetantion of Init() and call InitScene() individually. | |
| bool | InitOptions
(
TSharedRef< IDatasmithScene > InScene, |
Please use other InitOptions() implementations, having a valid scene should not be a requirement for initializing the options. |