Using Python to Batch-Edit Blueprints/Metasounds?

Is it possible to use python scripts to batch-edit nodes inside of Metasounds or Blueprints?

I’ve been creating scripts to batch-process a bunch of different things in Unreal but the one thing I haven’t figured out whether it’s possible is batch changing node values in Metaounds (or Blueprints).

Some examples of what I’m trying to do::

  • Searching a bunch of metasounds/blueprints for an input/variable with a certain name and changing those values to x or adding an amount to all those values

  • Searching a bunch of metasounds/blueprints for the names of a node input and changing those values

Any help much appreciated!

blueprints: yes for values, mostly-no for graph surgery. the reliable pattern: load the asset (unreal.EditorAssetLibrary.load_asset), get the class default object of the generated class (unreal.get_default_object(bp.generated_class())), set_editor_property for the defaults you want, then save_loaded_asset. that covers variable defaults and component property defaults across hundreds of assets in one pass. what it does not really cover is editing the node graph itself (adding/wiring k2nodes) — blueprinteditorlibrary exists but the surface is thin (compile, replace references, a few structural ops), so deep graph edits usually end up as a small editor-only c++ helper instead.

metasounds: the metasound asset subsystem (5.2+) is the official entry point, and input/value access has grown release by release — run help(unreal.MetaSoundAssetSubsystem) and dir() on the document interface in the python console to see exactly what your build exposes, because the 5.2 surface and the 5.8 surface are very different. if your version lacks setters for the inputs you need, the pragmatic fallback is runtime: set the values on the metasound component when playing and keep the tuning data in a data asset your batch script edits — you sidestep asset surgery entirely and the tuning becomes data.

for the search-and-replace-across-many-assets part: both blueprints and metasounds iterate fine with the asset registry (find candidates by class), then apply the per-asset edit above. one caution: back up / version-control before a bulk pass, because cdo edits save silently and a bad property name just does nothing rather than erroring.