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) None ¶
Create Bool Attribute
- create_double_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create Double Attribute
- create_float_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create Float Attribute
- create_integer32_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create new streams
- create_integer64_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create Integer 64Attribute
- create_quat_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create Quat Attribute
- create_rotator_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create Rotator Attribute
- create_string_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create String Attribute
- create_transform_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create Transform Attribute
- create_vector2_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create Vector 2Attribute
- create_vector4_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create Vector 4Attribute
- create_vector_attribute(attribute_name, default_value, allows_interpolation, override_parent=True) None ¶
Create Vector Attribute
- 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_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) 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:
metadata_to_copy (PCGMetadata) –
filter_mode (PCGMetadataFilterMode) –
- 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:
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