unreal.InterchangeBaseNode

class unreal.InterchangeBaseNode(outer=None, name='None')

Bases: unreal.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 (str) –

  • value (bool) –

Return type

bool

add_factory_dependency_uid(dependency_uid) bool

Add one dependency to this object.

Parameters

dependency_uid (str) –

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 (str) –

  • value (float) –

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 (str) –

  • value (int32) –

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 (str) –

  • 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

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 (str) –

Returns

out_value (bool):

Return type

bool or None

get_display_label() str

Return the display label.

Return type

str

get_factory_dependencies()

This function allow to retrieve the dependency for this object.

Returns

out_dependencies (Array(str)):

Return type

Array(str)

get_factory_dependencies_count() int32

This function allow to retrieve the number of factory dependencies for this object.

Return type

int32

get_factory_dependency(index) str

This function allow to retrieve one dependency for this object.

Parameters

index (int32) –

Returns

out_dependency (str):

Return type

str

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 (str) –

Returns

out_value (float):

Return type

float 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 (str) –

Returns

out_value (int32):

Return type

int32 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 (str) –

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()

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

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 (str) –

Return type

bool

remove_factory_dependency_uid(dependency_uid) bool

Remove one dependency from this object.

Parameters

dependency_uid (str) –

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 the parent unique id.

Parameters

parent_uid (str) –

Return type

bool