unreal.InterchangeBaseNode
¶
- class unreal.InterchangeBaseNode(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
This struct is used to store and retrieve key-value attributes. The attributes are stored in a generic FAttributeStorage that serializes the values in a TArray64<uint8>. See UE::Interchange::EAttributeTypes to know the supported template types. This is an abstract class. This is the base class of the interchange node graph format; all classes in this format should derive from this class.
C++ Source:
Module: InterchangeCore
File: InterchangeBaseNode.h
- add_boolean_attribute(node_attribute_key, value) bool ¶
Add a Boolean attribute to this node. Returns false if the attribute does not exist or if it cannot be added.
- add_double_attribute(node_attribute_key, value) bool ¶
Add a double attribute to this node. Returns false if the attribute does not exist or if it cannot be added.
- add_float_attribute(node_attribute_key, value) bool ¶
Add a float attribute to this node. Returns false if the attribute does not exist or if it cannot be added.
- add_guid_attribute(node_attribute_key, value) bool ¶
Add a GUID attribute to this node. Returns false if the attribute does not exist or if it cannot be added.
- add_int32_attribute(node_attribute_key, value) bool ¶
Add a int32 attribute to this node. Returns false if the attribute does not exist or if it cannot be added.
- add_linear_color_attribute(node_attribute_key, value) bool ¶
Add an FLinearColor attribute to this node. Returns false if the attribute does not exist or if it cannot be added.
- Parameters:
node_attribute_key (str) –
value (LinearColor) –
- Return type:
- add_string_attribute(node_attribute_key, value) bool ¶
Add a string attribute to this node. Returns false if the attribute does not exist or if it cannot be added.
- add_vector2_attribute(node_attribute_key, value) bool ¶
Add a Vector2 attribute to this node. Returns false if the attribute does not exist or if it cannot be added.
- get_asset_name() str ¶
Optional. Any node that can import or export an asset should set the desired name for the asset. If the attribute was never set, returns GetDisplayLabel().
- Return type:
- get_boolean_attribute(node_attribute_key) bool or None ¶
Get a Boolean attribute from this node. Returns false if the attribute does not exist.
- get_double_attribute(node_attribute_key) double or None ¶
Get a double attribute from this node. Returns false if the attribute does not exist.
- Parameters:
node_attribute_key (str) –
- Returns:
out_value (double):
- Return type:
double or None
- get_float_attribute(node_attribute_key) float or None ¶
Get a float attribute from this node. Returns false if the attribute does not exist.
- get_guid_attribute(node_attribute_key) Guid or None ¶
Get a GUID attribute from this node. Returns false if the attribute does not exist.
- get_int32_attribute(node_attribute_key) int32 or None ¶
Get a int32 attribute from this node. Returns false if the attribute does not exist.
- Parameters:
node_attribute_key (str) –
- Returns:
out_value (int32):
- Return type:
int32 or None
- get_linear_color_attribute(node_attribute_key) LinearColor or None ¶
Get an FLinearColor attribute from this node. Returns false if the attribute does not exist.
- Parameters:
node_attribute_key (str) –
- Returns:
out_value (LinearColor):
- Return type:
LinearColor or None
- get_node_container_type() InterchangeNodeContainerType ¶
Return the node container type that defines the purpose of the node (factory node, translated scene node, or translated asset node).
- Return type:
- get_parent_uid() str ¶
Return the parent unique ID. If the attribute does not exist, returns InvalidNodeUid().
- Return type:
- get_string_attribute(node_attribute_key) str or None ¶
Get a string attribute from this node. Returns false if the attribute does not exist.
- get_target_node_count() int32 ¶
Get the number of target assets relating to this object.
- Return type:
int32
- get_vector2_attribute(node_attribute_key) Vector2f or None ¶
Get a Vector2 attribute from this node. Returns false if the attribute does not exist.
- initialize_node(unique_id, display_label, node_container_type) None ¶
Initialize the base data of the node.
- Parameters:
unique_id (str) – The unique ID for this node.
display_label (str) – The name of the node.
node_container_type (InterchangeNodeContainerType) –
- is_enabled() bool ¶
If true, the node is imported or exported. If false, it is discarded. Returns false if the node was disabled. Returns true if the attribute is not there or if it was enabled.
- Return type:
- remove_attribute(node_attribute_key) bool ¶
Remove the specified attribute from this node. Returns false if it could not be removed. If the attribute does not exist, returns true.
- set_asset_name(asset_name) bool ¶
Set the name for the imported asset this node represents. The asset factory will call GetAssetName().