Stromberg
(Stromberg)
1
I want to get all the currently open blueprint editors in my editor plugin,
so that I can go through the nodes, to check names and such.
I have looked through the documentation for:
FBlueprintEditor
FBlueprintEditorUtils
Both of which contains great stuff I’ll need, but they need references to a graph or a blueprint, which I’m unsure how to get in the first place.
Other places I’ve been looking.
UE4-Node-Graph-Assistant
The last one goes through the slate widgets under the mouse position, which I don’t want it tied to my mouse position.
Any and all help is appreciated
mozhi1
(mozhi1)
2
maybe this is one of solutions,have a try;
TArray<UObject*> objs = GEditor->GetEditorSubsystem<UAssetEditorSubsystem>()->GetAllEditedAssets();
for (auto& obj : objs)
{
IAssetEditorInstance* AssetEditor = GEditor->GetEditorSubsystem<UAssetEditorSubsystem>()->FindEditorForAsset(obj, false);
FAssetEditorToolkit* editor = static_cast<FAssetEditorToolkit*>(AssetEditor);
TSharedPtr<SDockTab> tab = editor->GetTabManager()->GetOwnerTab();
if (tab->IsForeground()) {
FBlueprintEditor* BlueprintEditor = static_cast<FBlueprintEditor*>(editor);
}
}