unreal.PCGBlueprintBaseElement

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

Bases: Object

PCGBlueprint Base Element

C++ Source:

  • Plugin: PCG

  • Module: PCG

  • File: PCGBlueprintBaseElement.h

Editor Properties: (see get_editor_property/set_editor_property)

  • category (Text): [Read-Write]

  • compute_full_data_crc (bool): [Read-Write] In cases where your node is non-cacheable but is likely to yield the same results on subsequent executions, this controls whether we will do a deep & computationally intensive CRC computation (true), which will allow cache usage in downstream nodes in your graph, or, by default (false), a shallow but quick crc computation which will not be cache-friendly.

  • custom_input_pins (Array[PCGPinProperties]): [Read-Write]

  • custom_output_pins (Array[PCGPinProperties]): [Read-Write]

  • dependency_parsing_depth (int32): [Read-Write]

  • description (Text): [Read-Write]

  • enable_preconfigured_settings (bool): [Read-Write]

  • expose_to_library (bool): [Read-Write]

  • has_default_in_pin (bool): [Read-Write]

  • has_default_out_pin (bool): [Read-Write]

  • has_dynamic_pins (bool): [Read-Write] If enabled, by default, the Out pin type will have the union of In pin types. Default only works if the pins are In and Out. For custom behavior, implement DynamicPinTypesOverride.

  • is_cacheable (bool): [Read-Write] Controls whether results can be cached so we can bypass execution if the inputs & settings are the same in a subsequent execution. If you have implemented the IsCacheableOverride function, then this value is ignored. Note that if your node relies on data that is not directly tracked by PCG or creates any kind of artifact (adds components, creates actors, etc.) then it should not be cacheable.

  • only_expose_preconfigured_settings (bool): [Read-Write]

  • preconfigured_info (Array[PCGPreConfiguredSettingsInfo]): [Read-Write]

  • requires_game_thread (bool): [Read-Write] Controls whether this node execution can be run from a non-game thread. This is not related to the Loop functions provided/implemented in this class, which should always run on any thread.

apply_preconfigured_settings(preconfigure_info) None

Apply the preconfigured settings specified in the class default. Used to create nodes that are configured with pre-defined settings. Use InPreconfigureInfo index to know which settings it is.

Parameters:

preconfigure_info (PCGPreConfiguredSettingsInfo)

property category: Text

[Read-Write]

Type:

(Text)

property compute_full_data_crc: bool

[Read-Write] In cases where your node is non-cacheable but is likely to yield the same results on subsequent executions, this controls whether we will do a deep & computationally intensive CRC computation (true), which will allow cache usage in downstream nodes in your graph, or, by default (false), a shallow but quick crc computation which will not be cache-friendly.

Type:

(bool)

custom_input_labels() Set[Name]

Returns the labels of custom input pins only

Return type:

Set[Name]

property custom_input_pins: None

[Read-Write]

Type:

(Array[PCGPinProperties])

custom_output_labels() Set[Name]

Returns the labels of custom output pins only

Return type:

Set[Name]

property custom_output_pins: None

[Read-Write]

Type:

(Array[PCGPinProperties])

property dependency_parsing_depth: int

[Read-Write]

Type:

(int32)

property description: Text

[Read-Write]

Type:

(Text)

dynamic_pin_types_override(settings, pin) int32

If Dynamic Pins is enabled in the BP settings, override this function to provide the type for the given pin. You can use “GetTypeUnionOfIncidentEdges” from the settings to get the union of input types on a given pin. Use the bitwise OR to combine multiple types together.

Parameters:
Return type:

int32

property enable_preconfigured_settings: bool

[Read-Write]

Type:

(bool)

execute(input) PCGDataCollection

Main execution function that will contain the logic for this PCG Element. Use GetContextHandle to have access to the context.

Parameters:

input (PCGDataCollection) – Input collection containing all the data passed as input to the node.

Returns:

output (PCGDataCollection): Data collection that will be passed as the output of the node, with pins matching the ones provided during the execution.

Return type:

PCGDataCollection

property expose_to_library: bool

[Read-Write]

Type:

(bool)

get_context_handle() PCGBlueprintContextHandle

Get Context Handle

Return type:

PCGBlueprintContextHandle

get_input_pin_by_label(pin_label) PCGPinProperties or None

Returns true if there is an input pin with the matching label. If found, will copy the pin properties in OutFoundPin

Parameters:

pin_label (Name)

Returns:

out_found_pin (PCGPinProperties):

Return type:

PCGPinProperties or None

get_input_pins() Array[PCGPinProperties]

Get Input Pins

Return type:

Array[PCGPinProperties]

get_output_pin_by_label(pin_label) PCGPinProperties or None

Returns true if there is an output pin with the matching label. If found, will copy the pin properties in OutFoundPin

Parameters:

pin_label (Name)

Returns:

out_found_pin (PCGPinProperties):

Return type:

PCGPinProperties or None

get_output_pins() Array[PCGPinProperties]

Get Output Pins

Return type:

Array[PCGPinProperties]

get_random_stream_with_context(context_handle) RandomStream

Creates a random stream from the settings & source component

Parameters:

context_handle (PCGBlueprintContextHandle)

Return type:

RandomStream

get_seed_with_context(context_handle) int32

Gets the seed from the associated settings & source component

Parameters:

context_handle (PCGBlueprintContextHandle)

Return type:

int32

property has_default_in_pin: bool

[Read-Write]

Type:

(bool)

property has_default_out_pin: bool

[Read-Write]

Type:

(bool)

property has_dynamic_pins: bool

[Read-Write] If enabled, by default, the Out pin type will have the union of In pin types. Default only works if the pins are In and Out. For custom behavior, implement DynamicPinTypesOverride.

Type:

(bool)

property is_cacheable: bool

[Read-Write] Controls whether results can be cached so we can bypass execution if the inputs & settings are the same in a subsequent execution. If you have implemented the IsCacheableOverride function, then this value is ignored. Note that if your node relies on data that is not directly tracked by PCG or creates any kind of artifact (adds components, creates actors, etc.) then it should not be cacheable.

Type:

(bool)

is_cacheable_override() bool

Override for the IsCacheable node property when it depends on the settings in your node. If true, the node will be cached, if not it will always be executed.

Return type:

bool

node_color_override() LinearColor

Override for the default node color.

Return type:

LinearColor

node_title_override() Name

Override for the default node name

Return type:

Name

node_type_override() PCGSettingsType

Override to change the node type.

Return type:

PCGSettingsType

property only_expose_preconfigured_settings: bool

[Read-Write]

Type:

(bool)

property preconfigured_info: None

[Read-Write]

Type:

(Array[PCGPreConfiguredSettingsInfo])

property requires_game_thread: bool

[Read-Write] Controls whether this node execution can be run from a non-game thread. This is not related to the Loop functions provided/implemented in this class, which should always run on any thread.

Type:

(bool)