I’m executing a method in my Python script that triggers a function in my HTML file:
def OnLoadingStateChange(self, browser, is_loading, **_):
if not is_loading:
self.container.page_loaded = True
blueprint_text = """
Begin Object Class=/Script/BlueprintGraph.K2Node_Event Name="K2Node_Event_1" ExportPath="/Script/BlueprintGraph.K2Node_Event'/Game/ANCIENT_DRAGON/ABP_AncientDragon.ABP_AncientDragon:EventGraph.K2Node_Event_1'"
NodePosX=3392
NodePosY=-64
NodeGuid=EC7283AA406DE84613834BA97BBD68F1
EventReference=(MemberParent="/Script/CoreUObject.Class'/Script/Engine.AnimInstance'",MemberName="AnimNotify_FootShake")
CustomFunctionName="AnimNotify_FootShake"
CustomProperties Pin (PinId=318791834E3D459539EC3B87A24112FB,PinName="OutputDelegate",Direction="EGPD_Output",PinType.PinCategory="delegate",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(MemberParent="/Script/Engine.AnimBlueprintGeneratedClass'/Game/ANCIENT_DRAGON/ABP_AncientDragon.ABP_AncientDragon_C'",MemberName="AnimNotify_FootShake",MemberGuid=EC7283AA406DE84613834BA97BBD68F1),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False)
End Object
"""
js_code = f'renderBlueprint("{blueprint_text}");'
browser.ExecuteJavascript(js_code)
When I exclude the below line, it works fine but when included it gives an error stating that the node cannot be rendered.
CustomProperties Pin (PinId=318791834E3D459539EC3B87A24112FB,PinName="OutputDelegate",Direction="EGPD_Output",PinType.PinCategory="delegate",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(MemberParent="/Script/Engine.AnimBlueprintGeneratedClass'/Game/ANCIENT_DRAGON/ABP_AncientDragon.ABP_AncientDragon_C'",MemberName="AnimNotify_FootShake",MemberGuid=EC7283AA406DE84613834BA97BBD68F1),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False)
I’ve tried including this within the function to help the formatting but it makes no difference:
escaped_text = (
blueprint_text
.replace('\', '\\')
.replace('n', '\n')
.replace('"', '\"')
)
This is the function in my HTML file:
function renderBlueprint(blueprintText) {
// Stop any existing renderer
if (renderer) {
renderer.stop();
playground.innerHTML = ''; // Clear the playground
}
// Create and start a new renderer
renderer = new window.blueprintUE.render.Main(
blueprintText,
playground,
{ height: "100vh" }
);
renderer.start();
I’ve uploaded the JS file here.
Can anyone see why the “CustomProperties Pin” line would break its functionality?