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: PCGMetadata, attribute_name: Name) None

deprecated: ‘add_attribute’ was renamed to ‘bp_add_attribute’.

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, match_operator=PCGStringMatchingOperator.EQUAL) 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.

  • match_operator (PCGStringMatchingOperator) – How to match the names for the filtering

add_entry(parent_entry_key=-1) int64

Adds a unique entry key to the metadata

Parameters:

parent_entry_key (int64)

Return type:

int64

bp_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:
bp_clear_attribute(attribute_to_clear) None

Clear/Reinit attribute

Parameters:

attribute_to_clear (Name)

bp_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:
bp_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

bp_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)

bp_has_attribute(attribute_name) bool

BP Has Attribute

Parameters:

attribute_name (Name)

Return type:

bool

bp_rename_attribute(attribute_to_rename, new_attribute_name) bool

Rename attribute

Parameters:
  • attribute_to_rename (Name)

  • new_attribute_name (Name)

Return type:

bool

clear_attribute(attribute_to_clear: Name) None

deprecated: ‘clear_attribute’ was renamed to ‘bp_clear_attribute’.

copy_attribute(other: PCGMetadata, attribute_to_copy: Name, new_attribute_name: Name) None

deprecated: ‘copy_attribute’ was renamed to ‘bp_copy_attribute’.

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: Name, new_attribute_name: Name, keep_parent: bool = True) bool

deprecated: ‘copy_existing_attribute’ was renamed to ‘bp_copy_existing_attribute’.

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

Create Bool Attribute

Parameters:
  • attribute_name (Name)

  • default_value (bool)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

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

Create Double Attribute

Parameters:
  • attribute_name (Name)

  • default_value (double)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

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

Create Float Attribute

Parameters:
  • attribute_name (Name)

  • default_value (float)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

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

TODO: Will be moved at the end of the class before commit, as they are functions planned to be deprecated.

Parameters:
  • attribute_name (Name)

  • default_value (int32)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

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

Create Integer 64Attribute

Parameters:
  • attribute_name (Name)

  • default_value (int64)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

create_name_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata

Create Name Attribute

Parameters:
  • attribute_name (Name)

  • default_value (Name)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

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

Create Quat Attribute

Parameters:
  • attribute_name (Name)

  • default_value (Quat)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

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

Create Rotator Attribute

Parameters:
  • attribute_name (Name)

  • default_value (Rotator)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

create_soft_class_path_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata

Create Soft Class Path Attribute

Parameters:
Return type:

PCGMetadata

create_soft_object_path_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata

Create Soft Object Path Attribute

Parameters:
Return type:

PCGMetadata

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

Create String Attribute

Parameters:
  • attribute_name (Name)

  • default_value (str)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

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

Create Transform Attribute

Parameters:
Return type:

PCGMetadata

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

Create Vector 2Attribute

Parameters:
Return type:

PCGMetadata

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

Create Vector 4Attribute

Parameters:
  • attribute_name (Name)

  • default_value (Vector4)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

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

Create Vector Attribute

Parameters:
  • attribute_name (Name)

  • default_value (Vector)

  • allows_interpolation (bool)

  • override_parent (bool)

Return type:

PCGMetadata

delete_attribute(attribute_name: Name) None

deprecated: ‘delete_attribute’ was renamed to ‘bp_delete_attribute’.

flatten() None

Unparents current metadata by flattening the attributes (values, entries, etc.) and potentially compress the data to remove unused values.

get_attribute_count() int32

Return the number of attributes in this metadata.

Return type:

int32

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

Get all the attributes names and type on the default domain. If you need all the attributes on all domains, use GetAllAttributes.

Returns:

attribute_names (Array[Name]):

attribute_types (Array[PCGMetadataTypes]):

Return type:

tuple

get_item_count_for_child() int64

Return the number of entries in metadata including the parent entries.

Return type:

int64

has_attribute(attribute_name: Name) bool

deprecated: ‘has_attribute’ was renamed to ‘bp_has_attribute’.

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: PCGMetadata, optional_entries_to_copy: None) None

deprecated: ‘initialize_as_copy’ was renamed to ‘k2_initialize_as_copy’.

initialize_as_copy_with_attribute_filter(metadata_to_copy: PCGMetadata, filtered_attributes: None, optional_entries_to_copy: None, filter_mode: PCGMetadataFilterMode = Ellipsis, match_operator: PCGStringMatchingOperator = Ellipsis) None

deprecated: ‘initialize_as_copy_with_attribute_filter’ was renamed to ‘k2_initialize_as_copy_with_attribute_filter’.

initialize_with_attribute_filter(parent, filtered_attributes, filter_mode=PCGMetadataFilterMode.EXCLUDE_ATTRIBUTES, match_operator=PCGStringMatchingOperator.EQUAL) 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.

  • match_operator (PCGStringMatchingOperator) – How to match the names for the filtering

k2_initialize_as_copy(metadata_to_copy, optional_entries_to_copy) None

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

Parameters:
  • metadata_to_copy (PCGMetadata) – Metadata to copy from

  • optional_entries_to_copy (Array[int64]) – Optional array that contains the keys to copy over. This array order will be respected, so it can also be used to re-order entries. If empty, copy them all.

k2_initialize_as_copy_with_attribute_filter(metadata_to_copy, filtered_attributes, optional_entries_to_copy, filter_mode=PCGMetadataFilterMode.EXCLUDE_ATTRIBUTES, match_operator=PCGStringMatchingOperator.EQUAL) None

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

Parameters:
  • metadata_to_copy (PCGMetadata) – Metadata to copy from

  • filtered_attributes (Set[Name]) – Attributes to keep/exclude, can be empty.

  • optional_entries_to_copy (Array[int64]) – Optional array that contains the keys to copy over. This array order will be respected, so it can also be used to re-order entries. If empty, copy them all.

  • filter_mode (PCGMetadataFilterMode) – Filter to know if we should keep or exclude InFilteredAttributes.

  • match_operator (PCGStringMatchingOperator) – How to match the names for the filtering

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: Name, new_attribute_name: Name) bool

deprecated: ‘rename_attribute’ was renamed to ‘bp_rename_attribute’.

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