unreal.DatasmithMeshActorElement

class unreal.DatasmithMeshActorElement(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: DatasmithActorElement

  • UDatasmithMeshActorElement

C++ Source:

  • Plugin: DatasmithImporter

  • Module: DatasmithImporter

  • File: DatasmithUObjectElements.h

add_material_override(material) None

Adds a new material to the Actor Element

Parameters:

material (DatasmithMaterialIDElement) –

get_bounding_box_size() Vector

Get the Bounding Box of the Actor as a Vector. X is Width, Y is Height, Z is Depth. The value will are taken from the MeshElement and are factored by the Actor Scale. Bounding Box size can only be calculated if the Mesh can be found.

Return type:

Vector

get_material_overrides_count() int32

Get the amount of materials on this mesh

Return type:

int32

get_materials() Array[DatasmithMaterialIDElement]

Get the i-th material of this actor

Return type:

Array[DatasmithMaterialIDElement]

get_mesh_element() DatasmithMeshElement

Get the Datasmith MeshElement associated with the actor. The Mesh can be a direct reference to an Unreal Mesh. If it’s the case it will return an invalid MeshElement.

Return type:

DatasmithMeshElement

get_static_mesh_path_name() str

Get the path name of the StaticMesh associated with the actor

Return type:

str

remove_material_override(material) None

Get the amount of materials on this mesh

Parameters:

material (DatasmithMaterialIDElement) –

set_static_mesh_path_name(static_mesh_name) None

Set the path name of the StaticMesh that the actor is using It can be either a package path to refer to an existing mesh or a mesh name to refer to a MeshElement in the DatasmithScene

Parameters:

static_mesh_name (str) –