Create a new Key Command via C++ and bind it to the Editor

ok, managed to register it to the MainFrame and triggers :rolleyes:


void FBlueprintNodePrefabCommands::RegisterCommands()
{
    UI_COMMAND(SpawnNodePrefabList, "Spawn Node Prefab List", "Opens a list with Blueprint Node Prefabs to select from", EUserInterfaceActionType::Button, FInputChord(EKeys::RightMouseButton, true, false, false, false));
    actionList->MapAction(SpawnNodePrefabList, FExecuteAction::CreateStatic(&FBlueprintNodePrefabCommands::Callbacks::SpawnNodePrefabList), FCanExecuteAction::CreateStatic(&FBlueprintNodePrefabCommands::Callbacks::CanSpawnNodePrefabList));

    IMainFrameModule& mainFrame = FModuleManager::Get().LoadModuleChecked<IMainFrameModule>("MainFrame");
    mainFrame.GetMainFrameCommandBindings()->Append(actionList);
}

How to register the command now to SGraphPanel?

3 Likes