unreal.PCGMetadata

class unreal.PCGMetadata(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

C++ Source:

  • Plugin: PCG

  • Module: PCG

  • File: PCGMetadata.h

accumulate_point_weighted_attributes(point, metadata, weight, set_non_interpolable_attributes, out_point) PCGPoint

Accumulate Point Weighted Attributes

Parameters:
Returns:

out_point (PCGPoint):

Return type:

PCGPoint

accumulate_weighted_attributes_by_key(key, metadata, weight, set_non_interpolable_attributes, target_key) int64

Accumulate Weighted Attributes by Key

Parameters:
  • key (int64) –

  • metadata (PCGMetadata) –

  • weight (float) –

  • set_non_interpolable_attributes (bool) –

  • target_key (int64) –

Returns:

out_key (int64):

Return type:

int64

add_attribute(other, attribute_name) None

Creates missing attribute from another metadata if it is not currently present - note that this does not copy values

Parameters:
add_attributes(other) None

Creates missing attributes from another metadata if they are not currently present - note that this does not copy values

Parameters:

other (PCGMetadata) –

add_attributes_filtered(other, filtered_attributes, filter_mode=PCGMetadataFilterMode.EXCLUDE_ATTRIBUTES) None

Creates missing attributes from another metadata if they are not currently present - note that this does not copy values.

Parameters:
  • other (PCGMetadata) – The other metadata to obtain a list of attributes from.

  • filtered_attributes (Set[Name]) – Optional list of attributes to exclude or include when adding the attributes.

  • filter_mode (PCGMetadataFilterMode) – Defines attribute filter operation.

add_entry(parent_entry_key=-1) int64

Adds a unique entry key to the metadata

Parameters:

parent_entry_key (int64) –

Return type:

int64

clear_attribute(attribute_to_clear) None

Clear/Reinit attribute

Parameters:

attribute_to_clear (Name) –

copy_attribute(other, attribute_to_copy, new_attribute_name) None

Copies an attribute from another metadata, including entries & values. Warning: this is intended when dealing with the same data set

Parameters:
copy_attributes(other) None

Copies attributes from another metadata, including entries & values. Warning: this is intended when dealing with the same data set

Parameters:

other (PCGMetadata) –

copy_existing_attribute(attribute_to_copy, new_attribute_name, keep_parent=True) bool

Copy attribute

Parameters:
  • attribute_to_copy (Name) –

  • new_attribute_name (Name) –

  • keep_parent (bool) –

Return type:

bool

create_bool_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Bool Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (bool) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_double_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Double Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (double) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_float_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Float Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (float) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_integer32_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create new streams

Parameters:
  • attribute_name (Name) –

  • default_value (int32) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_integer64_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Integer 64Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (int64) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_quat_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Quat Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (Quat) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_rotator_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Rotator Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (Rotator) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_string_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create String Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (str) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_transform_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Transform Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (Transform) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_vector2_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Vector 2Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (Vector2D) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_vector4_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Vector 4Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (Vector4) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

create_vector_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None

Create Vector Attribute

Parameters:
  • attribute_name (Name) –

  • default_value (Vector) –

  • allows_interpolation (bool) –

  • override_parent (bool) –

delete_attribute(attribute_name) None

Delete/Hide attribute // Due to stream inheriting, we might want to consider “hiding” parent stream and deleting local streams only

Parameters:

attribute_name (Name) –

get_attributes() -> (attribute_names=Array[Name], attribute_types=Array[PCGMetadataTypes])

Get Attributes

Returns:

attribute_names (Array[Name]):

attribute_types (Array[PCGMetadataTypes]):

Return type:

tuple

has_attribute(attribute_name) bool

Has Attribute

Parameters:

attribute_name (Name) –

Return type:

bool

has_common_attributes(metadata) bool

Has Common Attributes

Parameters:

metadata (PCGMetadata) –

Return type:

bool

initialize(parent) None

Initializes the metadata from a parent metadata, if any (can be null). Copies attributes and values.

Parameters:

parent (PCGMetadata) –

initialize_as_copy(metadata_to_copy) None

Initializes the metadata from a parent metadata by copying all attributes to it.

Parameters:

metadata_to_copy (PCGMetadata) –

initialize_as_copy_with_attribute_filter(metadata_to_copy, filtered_attributes, filter_mode=PCGMetadataFilterMode.EXCLUDE_ATTRIBUTES) None

Initializes the metadata from a parent metadata by copy filtered attributes only to it

Parameters:
initialize_with_attribute_filter(parent, filtered_attributes, filter_mode=PCGMetadataFilterMode.EXCLUDE_ATTRIBUTES) None

Initializes the metadata from a parent metadata. Copies attributes and values.

Parameters:
  • parent (PCGMetadata) – The parent metadata to use as a template, if any (can be null).

  • filtered_attributes (Set[Name]) – Optional list of attributes to exclude or include when adding the attributes from the parent.

  • filter_mode (PCGMetadataFilterMode) – Defines attribute filter operation.

merge_attributes_by_key(key_a, metadata_a, key_b, metadata_b, target_key, op) int64

Blueprint-friend versions

Parameters:
Returns:

out_key (int64):

Return type:

int64

merge_point_attributes(point_a, metadata_a, point_b, metadata_b, target_point, op) PCGPoint

Merge Point Attributes

Parameters:
Returns:

target_point (PCGPoint):

Return type:

PCGPoint

rename_attribute(attribute_to_rename, new_attribute_name) bool

Rename attribute

Parameters:
  • attribute_to_rename (Name) –

  • new_attribute_name (Name) –

Return type:

bool

reset_point_weighted_attributes() PCGPoint

Reset Point Weighted Attributes

Returns:

out_point (PCGPoint):

Return type:

PCGPoint

reset_weighted_attributes_by_key(target_key) int64

Reset Weighted Attributes by Key

Parameters:

target_key (int64) –

Returns:

out_key (int64):

Return type:

int64

set_attributes_by_key(key, metadata, target_key) int64

Set Attributes by Key

Parameters:
  • key (int64) –

  • metadata (PCGMetadata) –

  • target_key (int64) –

Returns:

out_key (int64):

Return type:

int64

set_point_attributes(point, metadata, out_point) PCGPoint

Set Point Attributes

Parameters:
Returns:

out_point (PCGPoint):

Return type:

PCGPoint