unreal.PCGGraph

class unreal.PCGGraph(outer: Object | None = None, name: Name | str = 'None')

Bases: PCGGraphInterface

C++ Source:

  • Plugin: PCG

  • Module: PCG

  • File: PCGGraph.h

Editor Properties: (see get_editor_property/set_editor_property)

  • category (Text): [Read-Write]

  • debug_flag_applies_to_individual_components (bool): [Read-Write] When true the Debug flag in the graph editor will display debug information contextually for the selected debug object. Otherwise debug information is displayed for all components using a graph (requires regenerate).

  • description (Text): [Read-Write]

  • expose_to_library (bool): [Read-Write]

  • generation_radii (PCGRuntimeGenerationRadii): [Read-Write]

  • hi_gen_grid_size (PCGHiGenGrid): [Read-Write]

  • input_node (PCGNode): [Read-Only] Add input/output nodes

  • is_editor_only (bool): [Read-Write] Sets whether this graph is marked as editor-only; note that the IsEditorOnly call depends on the local graph value and the value in all subgraphs, recursively.

  • landscape_uses_metadata (bool): [Read-Write]

  • nodes (Array[PCGNode]): [Read-Only]

  • output_node (PCGNode): [Read-Only]

  • use_hierarchical_generation (bool): [Read-Write]

  • user_parameters (InstancedPropertyBag): [Read-Write] Parameters

add_edge(from_, from_pin_label, to, to_pin_label) PCGNode

Adds a directed edge in the graph. Returns the “To” node for easy chaining

Parameters:
Return type:

PCGNode

add_node_copy(settings) -> (PCGNode, default_node_settings=PCGSettings)

Creates a node and copies the input settings. Returns the created node.

Parameters:

settings (PCGSettings) –

Returns:

default_node_settings (PCGSettings):

Return type:

PCGSettings

add_node_instance(settings) PCGNode

Creates a node containing an instance to the given settings. Returns the created node.

Parameters:

settings (PCGSettings) –

Return type:

PCGNode

add_node_of_type(settings_class) -> (PCGNode, default_node_settings=PCGSettings)

Creates a default node based on the settings class wanted. Returns the newly created node.

Parameters:

settings_class (type(Class)) –

Returns:

default_node_settings (PCGSettings):

Return type:

PCGSettings

property category: Text

[Read-Write]

Type:

(Text)

property description: Text

[Read-Write]

Type:

(Text)

property expose_to_library: bool

[Read-Write]

Type:

(bool)

force_notification_for_editor(change_type=PCGChangeType.STRUCTURAL) None

Force Notification for Editor

Parameters:

change_type (PCGChangeType) –

property generation_radii: PCGRuntimeGenerationRadii

[Read-Write]

Type:

(PCGRuntimeGenerationRadii)

get_input_node() PCGNode

Returns the graph input node

Return type:

PCGNode

get_output_node() PCGNode

Returns the graph output node

Return type:

PCGNode

property input_node: PCGNode

[Read-Only] Add input/output nodes

Type:

(PCGNode)

property is_editor_only: bool

[Read-Write] Sets whether this graph is marked as editor-only; note that the IsEditorOnly call depends on the local graph value and the value in all subgraphs, recursively.

Type:

(bool)

property nodes: None

[Read-Only]

Type:

(Array[PCGNode])

property output_node: PCGNode

[Read-Only]

Type:

(PCGNode)

remove_edge(from_, from_label, to, to_label) bool

Removes an edge in the graph. Returns true if an edge was removed.

Parameters:
Return type:

bool

remove_node(node) None

Removes a node from the graph.

Parameters:

node (PCGNode) –

remove_nodes() Array[PCGNode]

Bulk removal of nodes, to avoid notifying the world everytime.

Returns:

nodes (Array[PCGNode]):

Return type:

Array[PCGNode]