unreal.DatasmithSceneElement

class unreal.DatasmithSceneElement(outer=None, name='None')

Bases: unreal.DatasmithSceneElementBase

Datasmith Scene Element

C++ Source:

  • Plugin: DatasmithImporter
  • Module: DatasmithImporter
  • File: DatasmithBlueprintLibrary.h
classmethod construct_datasmith_scene_from_file(file_path) → DatasmithSceneElement

Open an existing UDatasmith file from disk.

Parameters:file_path (str) – UDatasmith file path to open. ie: c:/MyFolder/MyFiles.udatasmith
Returns:The opened DatasmithScene, that can be modified and can be imported.
Return type:DatasmithSceneElement
destroy_scene() → None

Destroy reference to the udatasmith file. The Scene will no longer be available. DestroyScene is called automatically after ImportScene.

import_scene(destination_folder, import_options) → DatasmithImportFactoryCreateFileResult

Import a Datasmith Scene created with ConstructDatasmithSceneFromFile.

Parameters:
  • destination_folder (str) – Destination of where you want the asset to be imported. ie: /Game/MyFolder1
  • import_options (DatasmithImportBaseOptions) – Import Options to use during the import. It will affect the return value.
Returns:

A structure that contains the created actor or the blueprint actor depending of the options specified at the import.

Return type:

DatasmithImportFactoryCreateFileResult