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
new_parent (DatasmithActorElement) –
child (DatasmithActorElement) –
attachment_rule (DatasmithActorAttachmentRule) –
- 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
new_parent (DatasmithActorElement) –
attachment_rule (DatasmithActorAttachmentRule) –
- 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
- 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
- create_mesh(element_name) → DatasmithMeshElement¶
Create a new Mesh and add it to the Datasmith scene
- Parameters
element_name (Name) –
- Returns
- Return type
- create_mesh_actor(element_name) → DatasmithMeshActorElement¶
Create a new MeshActor and add it to the Datasmith scene
- Parameters
element_name (Name) –
- Returns
- Return type
- create_texture(element_name) → DatasmithTextureElement¶
Create a new Texture and add it to the Datasmith scene
- Parameters
element_name (Name) –
- Returns
- Return type
- 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
- 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
- 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
- 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
- get_all_materials()¶
Create an array with all the Materials in the Datasmith scene
- Returns
- Return type
- 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
- get_all_metadata(object_class)¶
Find all metadata elements associated with objects of the given type.
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- get_metadata_for_object(object) → DatasmithMetaDataElement¶
Get Meta Data for Object
- Parameters
object (DatasmithObjectElement) –
- Returns
- Return type
- 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
- get_post_process() → DatasmithPostProcessElement¶
Get the Postprocess used by the scene. Can be invalid.
- Returns
- Return type
- get_product_name() → str¶
Returns the product name of the application used to export the scene
- Returns
- Return type
- get_product_version() → str¶
Returns the product version of the application used to export the scene
- Returns
- Return type
- 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
- 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
- get_vendor() → str¶
Returns the vendor name of the application used to export the scene
- Returns
- Return type
- remove_camera_actor(mesh_actor, remove_rule=DatasmithActorRemovalRule.REMOVE_CHILDREN) → None¶
Remove the Camera actor from the Datasmith scene
- Parameters
mesh_actor (DatasmithCameraActorElement) –
remove_rule (DatasmithActorRemovalRule) –
- remove_custom_actor(custom_actor, remove_rule=DatasmithActorRemovalRule.REMOVE_CHILDREN) → None¶
Remove the LightActor from the Datasmith scene
- Parameters
custom_actor (DatasmithCustomActorElement) –
remove_rule (DatasmithActorRemovalRule) –
- 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
light_actor (DatasmithLightActorElement) –
remove_rule (DatasmithActorRemovalRule) –
- 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
mesh_actor (DatasmithMeshActorElement) –
remove_rule (DatasmithActorRemovalRule) –
- remove_texture(element) → None¶
Remove the Texture from the Datasmith scene
- Parameters
element (DatasmithTextureElement) –