Navigation
API > API/Plugins > API/Plugins/PCGPythonInteropEditor
Lightweight UObject bridge for passing FPCGDataCollection (a USTRUCT) into Python scope. Created per-execution with a unique name so Python can locate it via unreal.find_object(). Used by the Python Data Processor node to give users direct access to input/output collections.
@todo_pcg: This bridge exists because PythonScriptPlugin's PyConversion headers are Private, so we can't use PyConversion::NativizeProperty to transfer USTRUCTs directly between Python and C++. If those headers become public, this class can be removed in favor of direct struct marshalling.
| Name | UPCGPythonDataBridge |
| Type | class |
| Header File | /Engine/Plugins/PCGInterops/PCGPythonInterop/Source/PCGPythonInteropEditor/Public/Helpers/PCGPythonDataBridge.h |
| Include Path | #include "Helpers/PCGPythonDataBridge.h" |
Syntax
UCLASS (BlueprintType)
class UPCGPythonDataBridge : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPCGPythonDataBridge
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bOutputCollectionSet | bool | Helpers/PCGPythonDataBridge.h | ||
| InputCollection | FPCGDataCollection | Helpers/PCGPythonDataBridge.h | ||
| OutputCollection | FPCGDataCollection | Helpers/PCGPythonDataBridge.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddToCollection
(
const UPCGData* InData, |
Adds data to the output collection, tagged to the given pin label. | Helpers/PCGPythonDataBridge.h |
|
FPCGDataCollection GetInputCollection() |
Returns the input data collection for the current execution. | Helpers/PCGPythonDataBridge.h |
|
const FPCGDataCollection & GetOutputCollection () |
Returns the output collection set by the user's script. | Helpers/PCGPythonDataBridge.h | |
bool HasOutputCollection() |
Returns true if SetOutputCollection was called during this execution. | Helpers/PCGPythonDataBridge.h | |
void Initialize
(
const FPCGDataCollection& InInputCollection |
Populates the bridge with input data before script execution. | Helpers/PCGPythonDataBridge.h | |
void SetOutputCollection
(
const FPCGDataCollection& Collection |
Stores the output data collection built by the user's Python script. | Helpers/PCGPythonDataBridge.h |
|