MCPcopy Create free account
hub / github.com/20tab/UnrealEnginePython / RegisterCommands

Method RegisterCommands

Source/UnrealEnginePython/Private/UEPySlate.cpp:13–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11std::map<FString, std::list<FPythonSlateCommand *> *> *python_commands;
12
13void FPythonSlateCommands::RegisterCommands()
14{
15 if (!python_commands)
16 return;
17
18 for (auto cmd_map : *python_commands) {
19 for (FPythonSlateCommand *cmd : *cmd_map.second) {
20 if (!cmd->py_callable)
21 continue;
22 UI_COMMAND_Function(this,
23 cmd->PythonSlateAction,
24 nullptr,
25 *cmd->command_name,
26 *cmd->command_name,
27 TCHAR_TO_UTF8(*cmd->command_name),
28 *cmd->command_name,
29 *cmd->command_name,
30 EUserInterfaceActionType::Button, FInputGesture());
31
32 UE_LOG(LogPython, Log, TEXT("Registered python extender command \"%s\""), *cmd->command_name);
33 }
34 }
35}
36
37void FPythonSlateCommand::Builder(FMenuBuilder& Builder) {
38 Builder.AddMenuEntry(PythonSlateAction);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected