unreal.PCGPythonDataBridge¶
- class unreal.PCGPythonDataBridge(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
ObjectLightweight 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.
C++ Source:
Plugin: PCGPythonInterop
Module: PCGPythonInteropEditor
File: PCGPythonDataBridge.h
- add_to_collection(data, pin_label, tags) None¶
Adds data to the output collection, tagged to the given pin label. Mirrors UPCGDataFunctionLibrary::AddToCollection.
- get_input_collection() PCGDataCollection¶
Returns the input data collection for the current execution.
- Return type:
- set_output_collection(collection) None¶
Stores the output data collection built by the user’s Python script.
- Parameters:
collection (PCGDataCollection)