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
- 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_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_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
- 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_factory_dependencies()¶
This function allow to retrieve the dependency for this object.
- 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
- 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_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
- 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_target_node_uids()¶
Get target assets relating to this object.
- 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()