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

Parameters:
  • node_attribute_key (Name) –

  • value (bool) –

Return type:

bool

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

Parameters:
  • node_attribute_key (Name) –

  • value (double) –

Return type:

bool

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

Parameters:
  • node_attribute_key (Name) –

  • value (float) –

Return type:

bool

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

Parameters:
  • node_attribute_key (Name) –

  • value (Guid) –

Return type:

bool

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

Parameters:
  • node_attribute_key (Name) –

  • value (int32) –

Return type:

bool

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:
Return type:

bool

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

Parameters:
  • node_attribute_key (Name) –

  • value (str) –

Return type:

bool

add_target_node_uid(asset_uid) bool

Add asset node UID relating to this object.

Parameters:

asset_uid (str) –

Return type:

bool

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

Parameters:
Return type:

bool

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:

str

get_boolean_attribute(node_attribute_key) bool or None

Get a boolean attribute from this node. Return false if the attribute do not exist

Parameters:

node_attribute_key (Name) –

Returns:

out_value (bool):

Return type:

bool or None

get_display_label() str

Return the display label.

Return type:

str

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

Parameters:

node_attribute_key (Name) –

Returns:

out_value (float):

Return type:

float or None

get_guid_attribute(node_attribute_key) Guid or None

Get a guid attribute from this node. Return false if the attribute do not exist

Parameters:

node_attribute_key (Name) –

Returns:

out_value (Guid):

Return type:

Guid or None

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:

InterchangeNodeContainerType

get_parent_uid() str

Return the parent unique id. In case the attribute does not exist it will return InvalidNodeUid()

Return type:

str

get_string_attribute(node_attribute_key) str or None

Get a string attribute from this node. Return false if the attribute do not exist

Parameters:

node_attribute_key (Name) –

Returns:

out_value (str):

Return type:

str or None

get_target_node_count() int32

Get number of target assets relating to this object.

Return type:

int32

get_target_node_uids() Array[str]

Get target assets relating to this object.

Returns:

out_target_assets (Array[str]):

Return type:

Array[str]

get_unique_id() str

Return the unique id pass in the constructor.

Return type:

str

get_vector2_attribute(node_attribute_key) Vector2f or None

Get a Vector2 attribute from this node. Return false if the attribute do not exist

Parameters:

node_attribute_key (Name) –

Returns:

out_value (Vector2f):

Return type:

Vector2f or None

initialize_node(unique_id, display_label, node_container_type) None

Initialize the base data of the node

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

bool

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.

Parameters:

node_attribute_key (Name) –

Return type:

bool

remove_target_node_uid(asset_uid) bool

Remove asset node UID relating to this object.

Parameters:

asset_uid (str) –

Return type:

bool

set_asset_name(asset_name) bool

Set the name we want for the imported asset this node represent. The asset factory will call GetAssetName()

Parameters:

asset_name (str) –

Return type:

bool

set_display_label(display_name) bool

Change the display label.

Parameters:

display_name (str) –

Return type:

bool

set_enabled(is_enabled) bool

Set the IsEnable attribute to determine if this node should be part of the import/export process

Parameters:

is_enabled (bool) – The enabled state we want to set this node. True will import/export the node, fals will not.

Returns:

true if it was able to set the attribute, false otherwise.

Return type:

bool

set_parent_uid(parent_uid) bool

Set Parent Uid

Parameters:

parent_uid (str) –

Return type:

bool