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
- 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:
other (PCGMetadata) –
attribute_name (Name) –
- 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:
other (PCGMetadata) –
attribute_to_copy (Name) –
new_attribute_name (Name) –
- 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
- create_bool_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Bool Attribute
- Parameters:
- Return type:
- create_double_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Double Attribute
- Parameters:
- Return type:
- create_float_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Float Attribute
- Parameters:
- Return type:
- create_integer32_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Integer 32Attribute
- Parameters:
- Return type:
- create_integer64_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Integer 64Attribute
- Parameters:
- Return type:
- create_name_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Name Attribute
- Parameters:
- Return type:
- create_quat_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Quat Attribute
- Parameters:
- Return type:
- create_rotator_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Rotator Attribute
- Parameters:
- Return type:
- create_soft_class_path_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Soft Class Path Attribute
- Parameters:
attribute_name (Name) –
default_value (SoftClassPath) –
allows_interpolation (bool) –
override_parent (bool) –
- Return type:
- create_soft_object_path_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Soft Object Path Attribute
- Parameters:
attribute_name (Name) –
default_value (SoftObjectPath) –
allows_interpolation (bool) –
override_parent (bool) –
- Return type:
- create_string_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create String Attribute
- Parameters:
- Return type:
- create_transform_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Transform Attribute
- Parameters:
- Return type:
- create_vector2_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Vector 2Attribute
- Parameters:
- Return type:
- create_vector4_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Vector 4Attribute
- Parameters:
- Return type:
- create_vector_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) PCGMetadata ¶
Create Vector Attribute
- Parameters:
- Return type:
- 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) –
- 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 Attributes
- 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_common_attributes(metadata) bool ¶
Has Common Attributes
- Parameters:
metadata (PCGMetadata) –
- Return type:
- 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) 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) 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.
- 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) 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.
- merge_attributes_by_key(key_a, metadata_a, key_b, metadata_b, target_key, op) int64 ¶
Blueprint-friend versions
- Parameters:
key_a (int64) –
metadata_a (PCGMetadata) –
key_b (int64) –
metadata_b (PCGMetadata) –
target_key (int64) –
op (PCGMetadataOp) –
- 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:
point_a (PCGPoint) –
metadata_a (PCGMetadata) –
point_b (PCGPoint) –
metadata_b (PCGMetadata) –
target_point (PCGPoint) –
op (PCGMetadataOp) –
- Returns:
target_point (PCGPoint):
- Return type:
- reset_point_weighted_attributes() PCGPoint ¶
Reset Point Weighted Attributes
- Returns:
out_point (PCGPoint):
- Return type:
- 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