unreal.DatasmithSceneElementBase

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

Bases: unreal.Object

Datasmith Scene Element Base

C++ Source:

  • Plugin: DatasmithImporter

  • Module: DatasmithImporter

  • File: DatasmithUSceneElement.h

attach_actor(new_parent, child, attachment_rule)None

Attach the actor to his new parent. Detach the actor if he was already attach.

Parameters
attach_actor_to_scene_root(new_parent, attachment_rule)None

Attach the actor to the scene root. Detach the actor if he was already attach.

Parameters
create_camera_actor(element_name)DatasmithCameraActorElement

Create a new Camera Actor and add it to the Datasmith scene

Parameters

element_name (Name) –

Returns

Return type

DatasmithCameraActorElement

create_level_variant_sets(element_name)DatasmithLevelVariantSetsElement

Create a new level variant sets and add it to the Datasmith scene

Parameters

element_name (Name) –

Returns

Return type

DatasmithLevelVariantSetsElement

create_mesh(element_name)DatasmithMeshElement

Create a new Mesh and add it to the Datasmith scene

Parameters

element_name (Name) –

Returns

Return type

DatasmithMeshElement

create_mesh_actor(element_name)DatasmithMeshActorElement

Create a new MeshActor and add it to the Datasmith scene

Parameters

element_name (Name) –

Returns

Return type

DatasmithMeshActorElement

create_texture(element_name)DatasmithTextureElement

Create a new Texture and add it to the Datasmith scene

Parameters

element_name (Name) –

Returns

Return type

DatasmithTextureElement

get_all_camera_actors()

Create an array with all the CameraActor in the Datasmith scene without taking into account the hierarchy. Use CreateCameraActor -or- RemoveCameraActor to modify the Datasmith scene.

Returns

Return type

Array(DatasmithCameraActorElement)

get_all_custom_actors()

Create an array with all the CustomActor in the Datasmith scene without taking into account the hierarchy. Use RemoveCustomActor to modify the Datasmith scene.

Returns

Return type

Array(DatasmithCustomActorElement)

get_all_level_variant_sets()

Create an array with all the level variants sets from the Datasmith scene Use CreateLevelVariantSets -or- RemoveLevelVariantSets to modify the Datasmith scene.

Returns

Return type

Array(DatasmithLevelVariantSetsElement)

get_all_light_actors()

Create an array with all the LightActor in the Datasmith scene without taking into account the hierarchy. Use RemoveLightActor to modify the Datasmith scene.

Returns

Return type

Array(DatasmithLightActorElement)

get_all_materials()

Create an array with all the Materials in the Datasmith scene

Returns

Return type

Array(DatasmithBaseMaterialElement)

get_all_mesh_actors()

Create an array with all the MeshActor in the Datasmith scene without taking into account the hierarchy. Use CreateMeshActor -or- RemoveMeshActor to modify the Datasmith scene.

Returns

Return type

Array(DatasmithMeshActorElement)

get_all_metadata(object_class)

Find all metadata elements associated with objects of the given type.

Parameters

object_class (type(Class)) – Class of the object on which to filter, if specificed; otherwise there’s no filtering

Returns

out_metadatas (Array(DatasmithMetaDataElement)): Output array of metadata elements.

Return type

Array(DatasmithMetaDataElement)

get_all_objects_and_values_for_key(key, object_class) -> (out_objects=Array(DatasmithObjectElement), out_values=Array(str))

Find all objects of the given type that have a metadata element that contains the given key and their associated values.

Parameters
  • key (str) – The key to find in the metadata element.

  • object_class (type(Class)) – Class of the object on which to filter, if specificed; otherwise there’s no filtering

Returns

out_objects (Array(DatasmithObjectElement)): Output array of objects for which the metadata element contains the given key.

out_values (Array(str)): Output array of values associated with each object in OutObjects.

Return type

tuple

get_camera_actors()

Create an array with the CameraActor in the Datasmith scene that are at the root level of the hierarchy. Use CreateCameraActor -or- RemoveCameraActor to modify the Datasmith scene.

Returns

Return type

Array(DatasmithCameraActorElement)

get_custom_actors()

Create an array with the CustomActor in the Datasmith scene that are at the root level of the hierarchy. Use RemoveCustomActor to modify the Datasmith scene.

Returns

Return type

Array(DatasmithCustomActorElement)

get_export_duration()int32

Returns the time taken to export the scene

Returns

Return type

int32

get_exporter_version()str

Returns the Datasmith version used to export the scene

Returns

Return type

str

get_host()str

Sets the name of the host application which created the scene

Returns

Return type

str

get_light_actors()

Create an array with the LightActor in the Datasmith scene that are at the root level of the hierarchy. Use RemoveLightActor to modify the Datasmith scene.

Returns

Return type

Array(DatasmithLightActorElement)

get_mesh_actors()

Create an array with the MeshActor in the Datasmith scene that are at the root level of the hierarchy. Use CreateMeshActor -or- RemoveMeshActor to modify the Datasmith scene.

Returns

Return type

Array(DatasmithMeshActorElement)

get_mesh_by_path_name(mesh_path_name)DatasmithMeshElement

Find in the Datasmith scene the MeshElement that correspond to the mesh path name. The function will return an invalid MeshElement, if the MeshPathName is empty or if it’s not relative to the Datasmith scene or if it’s not found.

Parameters

mesh_path_name (str) –

Returns

Return type

DatasmithMeshElement

get_meshes()

Create an array with all the Mesh in the Datasmith scene. Use CreateMesh -or- RemoveMesh to modify the Datasmith scene.

Returns

Return type

Array(DatasmithMeshElement)

get_metadata_for_object(object)DatasmithMetaDataElement

Get Meta Data for Object

Parameters

object (DatasmithObjectElement) –

Returns

Return type

DatasmithMetaDataElement

get_metadata_keys_and_values_for_value(object, string_to_match) -> (out_keys=Array(str), out_values=Array(str))

Get the keys and values for which the associated value contains the string to match for the metadata element associated with the given object.

Parameters
  • object (DatasmithObjectElement) – The Object that is associated with the metadata element of interest.

  • string_to_match (str) – The string to match in the values.

Returns

out_keys (Array(str)): Output array of keys for which the associated values contain the string to match.

out_values (Array(str)): Output array of values associated to the keys.

Return type

tuple

get_metadata_value_for_key(object, key)str

Get the value associated with the given key of the metadata element associated with the given object.

Parameters
  • object (DatasmithObjectElement) – The Object that is associated with the metadata element of interest.

  • key (str) – The key to find in the metadata element.

Returns

The string value associated with the given key

Return type

str

get_post_process()DatasmithPostProcessElement

Get the Postprocess used by the scene. Can be invalid.

Returns

Return type

DatasmithPostProcessElement

get_product_name()str

Returns the product name of the application used to export the scene

Returns

Return type

str

get_product_version()str

Returns the product version of the application used to export the scene

Returns

Return type

str

get_textures()

Create an array with all the Textures in the Datasmith scene. Call CreateTexture -or- RemoveTexture to modify the Datasmith scene.

Returns

Return type

Array(DatasmithTextureElement)

get_use_physical_sky()bool

Physical Sky could be generated in a large amount of modes, like material, lights etc that’s why it has been added as static, just enable it and it is done. Notice that if a HDRI environment is used this gets disabled.

Returns

Return type

bool

get_user_id()str

Returns the user identifier who exported the scene

Returns

Return type

str

get_user_os()str

Returns the OS name used by user who exported the scene

Returns

Return type

str

get_vendor()str

Returns the vendor name of the application used to export the scene

Returns

Return type

str

remove_camera_actor(mesh_actor, remove_rule=DatasmithActorRemovalRule.REMOVE_CHILDREN)None

Remove the Camera actor from the Datasmith scene

Parameters
remove_custom_actor(custom_actor, remove_rule=DatasmithActorRemovalRule.REMOVE_CHILDREN)None

Remove the LightActor from the Datasmith scene

Parameters
remove_level_variant_sets(element)None

Remove the level variant sets from the Datasmith scene

Parameters

element (DatasmithLevelVariantSetsElement) –

remove_light_actor(light_actor, remove_rule=DatasmithActorRemovalRule.REMOVE_CHILDREN)None

Remove the LightActor from the Datasmith scene

Parameters
remove_material(element)None

Remove the material from the Datasmith scene

Parameters

element (DatasmithBaseMaterialElement) –

remove_mesh(mesh)None

Remove the mesh from the Datasmith scene

Parameters

mesh (DatasmithMeshElement) –

remove_mesh_actor(mesh_actor, remove_rule=DatasmithActorRemovalRule.REMOVE_CHILDREN)None

Remove the MeshActor from the Datasmith scene

Parameters
remove_texture(element)None

Remove the Texture from the Datasmith scene

Parameters

element (DatasmithTextureElement) –