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 store in a generic FAttributeStorage which serialize the value 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 class 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. Return false if the attribute do not exist or if we cannot add it
- add_double_attribute(node_attribute_key, value) bool ¶
Add a double attribute to this node. Return false if the attribute do not exist or if we cannot add it
- add_float_attribute(node_attribute_key, value) bool ¶
Add a float attribute to this node. Return false if the attribute do not exist or if we cannot add it
- add_guid_attribute(node_attribute_key, value) bool ¶
Add a guid attribute to this node. Return false if the attribute do not exist or if we cannot add it
- add_int32_attribute(node_attribute_key, value) bool ¶
Add a int32 attribute to this node. Return false if the attribute do not exist or if we cannot add it
- add_linear_color_attribute(node_attribute_key, value) bool ¶
Add a FLinearColor attribute to this node. Return false if the attribute do not exist or if we cannot add it
- Parameters:
node_attribute_key (Name) –
value (LinearColor) –
- Return type:
- add_string_attribute(node_attribute_key, value) bool ¶
Add a string attribute to this node. Return false if the attribute do not exist or if we cannot add it
- add_vector2_attribute(node_attribute_key, value) bool ¶
Add a Vector2 attribute to this node. Return false if the attribute do not exist or if we cannot add it
- get_asset_name() str ¶
Optional, Any node that can import/export an asset should set the proper name we will give to the asset. If the attribute was never set, it will return GetDisplayLabel.
- Return type:
- get_boolean_attribute(node_attribute_key) bool or None ¶
Get a boolean attribute from this node. Return false if the attribute do not exist
- get_double_attribute(node_attribute_key) double or None ¶
Get a double attribute from this node. Return false if the attribute do not exist
- Parameters:
node_attribute_key (Name) –
- 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. Return false if the attribute do not exist
- get_guid_attribute(node_attribute_key) Guid or None ¶
Get a guid attribute from this node. Return false if the attribute do not exist
- get_int32_attribute(node_attribute_key) int32 or None ¶
Get a int32 attribute from this node. Return false if the attribute do not exist
- Parameters:
node_attribute_key (Name) –
- Returns:
out_value (int32):
- Return type:
int32 or None
- get_linear_color_attribute(node_attribute_key) LinearColor or None ¶
Get a FLinearColor attribute from this node. Return false if the attribute do not exist
- Parameters:
node_attribute_key (Name) –
- Returns:
out_value (LinearColor):
- Return type:
LinearColor or None
- get_node_container_type() InterchangeNodeContainerType ¶
Return the node container type which define 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. In case the attribute does not exist it will return InvalidNodeUid()
- Return type:
- get_string_attribute(node_attribute_key) str or None ¶
Get a string attribute from this node. Return false if the attribute do not exist
- get_target_node_count() int32 ¶
Get 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. Return false if the attribute do not exist
- initialize_node(unique_id, display_label, node_container_type) None ¶
Initialize the base data of the node
- Parameters:
unique_id (str) – The uniqueId for this node
display_label (str) – The name of the node
node_container_type (InterchangeNodeContainerType) –
- is_enabled() bool ¶
IsEnable true mean that the node will be import/export, if false it will be discarded. Return false if this node was disabled. Return true if the attribute is not there or if it was enabled.
- Return type:
- remove_attribute(node_attribute_key) bool ¶
Remove any attribute from this node. Return false if we cannot remove it. If the attribute do not exist it will return true.
- set_asset_name(asset_name) bool ¶
Set the name we want for the imported asset this node represent. The asset factory will call GetAssetName()