| 11 | std::map<FString, std::list<FPythonSlateCommand *> *> *python_commands; |
| 12 | |
| 13 | void 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 | |
| 37 | void FPythonSlateCommand::Builder(FMenuBuilder& Builder) { |
| 38 | Builder.AddMenuEntry(PythonSlateAction); |
nothing calls this directly
no outgoing calls
no test coverage detected