Best way to do offline blueprint processing?

I want to perform a fairly expensive process on a class of blueprints: collect all the vertices in all the static meshes attached to the blueprint, compute a 2d convex hull and then save it out again. This should happen to all BPs that derive from our own C+±defined actor class, AIslandActor.

This hull-computation is absolutely not something that should happen at runtime, ever. Ideally we could compute it in editor code whenever the “compile blueprint” button is clicked. (Tying it to that button makes sense to me, because blueprint compilation is something that designers and artists are used to doing anyway).

Is there an officially sanctioned way to do this? Am I looking at some kind of Editor Plug-in? If I then modify the CDO for the blueprint in question, will those changes get properly saved out again?

This is not the first time that I’ve looked for a way to do tools-level processing of blueprints. Any documentation on that subject would be great.

Here https://www.youtube.com/watch?v=zg_VstBxDi8 is a great start on how to extend the editor

How to access the actors in current open level in editor

UWorld *EditorWorld = GEditor->LevelViewportClients[0]->GetWorld();

Requires module in ProjectName.Build.cs

public ProjectName(TargetInfo Target)
{
     PublicDependencyModuleNames.AddRange(new string[] { "UnrealEd", });
}

I think as long as the variable is a UPROPERTY(EditDefaultsOnly) (I think EditAnywhere also works) it will be saved by the editor.
You could do something like UPROPERTY(EditDefaultsOnly) TArray(uint8) Data; // The TArray can't be typed correctly in this forum ;P if nothing else works.