You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importunreal_engineasuefromunreal_engine.classesimportK2Node_MacroInstance, EdGraphfromunreal_engine.structsimportGraphReference# for_each_loop = ue.load_object(EdGraph, '/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoop')for_each_loop=ue.find_object('ForEachLoop')
# get a reference to your blueprintblueprint= ...
# add the nodenode=blueprint.UberGraphPages[0].graph_add_node(K2Node_MacroInstance)
# assign the macro graph to the nodenode.MacroGraphReference=GraphReference(MacroGraph=for_each_loop)
# allocate pinsnode.node_allocate_default_pins()
# update the blueprintue.blueprint_mark_as_structurally_modified(bp)