unreal.DatasmithVREDSceneElement

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

Bases: unreal.DatasmithSceneElementBase

Extends UDatasmithSceneElementBase with a couple of functions that can be used by Blueprints and Python to handle VRED scene imports. This library handles importing into memory Datasmith scene objects, so that the imported data can be processed or parsed. Later, this intermediate (potentially processed) object can be imported, creating assets and scene actors.

See: UDatasmithVREDBlueprintLibrary

C++ Source:

  • Plugin: DatasmithFBXImporter
  • Module: DatasmithVREDImporter
  • File: DatasmithVREDBlueprintLibrary.h
classmethod construct_datasmith_scene_from_file(file_path, package_name, datasmith_import_options, vred_import_options) → DatasmithVREDSceneElement

Open an existing VRED FBX file from disk, returning the DatasmithScene object before its imported or assets are created

Parameters:
  • file_path (str) – FBX file path to open (example: c:/MyFolder/MyFiles.fbx)
  • package_name (str) – Content folder to import to (example: /Game/ImportedScenes)
  • datasmith_import_options (DatasmithImportBaseOptions) – Base datasmith import options, like whether to import geometry, materials, etc
  • vred_import_options (DatasmithVREDImportOptions) – Import options specific to VRED, like whether to import variants or not. Can be nullptr/None
Returns:

The opened Datasmith scene, that can be modified and later imported or destroyed

Return type:

DatasmithVREDSceneElement

destroy_scene() → None

Destroy reference to the Datasmith Scene DestroyScene is called automatically after ImportScene, once the assets have been created and spawned into the level

get_all_anim_clips() -> Array(DatasmithFBXSceneAnimClip)

Returns a copy to an array with all parsed AnimClips from the .clips file

Returns:Array of FDatasmithFBXSceneAnimClip
Return type:Array(DatasmithFBXSceneAnimClip)
get_all_anim_nodes() -> Array(DatasmithFBXSceneAnimNode)

Returns a copy to an array with all parsed AnimNodes from the .clips file

Returns:Array of AnimNodes
Return type:Array(DatasmithFBXSceneAnimNode)
get_all_extra_lights_info() -> Array(DatasmithFBXSceneLight)

Returns a copy to an array with all parsed extra lights info from the .lights file

Returns:Array of FDatasmithFBXSceneLight
Return type:Array(DatasmithFBXSceneLight)
get_all_variants() -> Array(VREDCppVariant)

Returns a copy to an array with all parsed variants and variant sets from the .var file

Returns:Array of FVREDCppVariant
Return type:Array(VREDCppVariant)
import_scene() → DatasmithVREDImportFactoryCreateFileResult

Import a Datasmith Scene created with ConstructDatasmithSceneFromFile.

Returns:A structure that contains the created scene actors as well as referenced to the created data table assets
Return type:DatasmithVREDImportFactoryCreateFileResult
set_all_anim_clips(new_anim_clips) → None

Sets the scene AnimNodes to the received array

Parameters:new_anim_clips (Array(DatasmithFBXSceneAnimClip)) – Array of AnimNodes taken by copy
set_all_anim_nodes(new_anim_nodes) → None

Sets the scene AnimNodes to the received array

Parameters:new_anim_nodes (Array(DatasmithFBXSceneAnimNode)) – Array of FDatasmithFBXSceneAnimNode taken by copy
set_all_extra_lights_info(new_extra_lights_info) → None

Sets the scene extra lights info to the received array

Parameters:new_extra_lights_info (Array(DatasmithFBXSceneLight)) – Array of FDatasmithFBXSceneLight taken by copy
set_all_variants(new_variants) → None

Sets the scene variants to the received array

Parameters:new_variants (Array(VREDCppVariant)) – Array of variants taken by copy