How to modify blueprint class with c++?

I’m trying to extend the editor to do some things to blueprint and components inside of said blueprint. In my case I’m importing stuff from fbx and importer generates a single blueprint class which I need to edit. This means that I need to edit a blueprint class that doesn’t have a custom c++ class as a parent.

I tried to use UObjectLibrary but that seem to work only for blueprints that derive from custom c++ classes. Maybe it’s possible to do something with the UObjectLibrary but I haven’t found it. I’m guessing that I’ll have to serialize / deserialize the .uasset file but I’m not sure how to do it. I’ve been looking at the source code but the system seems fairly complex and I haven’t found anything groundbreaking.

So any tips regarding this problem? It would help a lot if someone would steer me to right direction with this. Right now I feel like I have no idea what I’m doing so if the methods above are completely wrong, please do tell me.

I was able to solve the problem with UObjectLibrary after all. I had to use LoadBlueprintsFromPath() and get the results as UBlueprintGeneratedClass. From UBlueprintGeneratedClass I was able to get USCS_Nodes via SimpleConstructionScript->GetAllNodes(). From those nodes I was able to get UActorComponent with ComponentTemplate.

With this I’m able to edit Blueprint components that are created in the editor.