EditorCommandPalette (original) (raw)

Godot Engine

Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

Checking the stable version of the documentation...

Inherits: ConfirmationDialog < AcceptDialog < Window < Viewport < Node < Object

Godot editor's command palette.

Description

Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through Editor > Command Palette menu.

Command key names use slash delimiters to distinguish sections, for example: "example/command1" then example will be the section name.

var command_palette = EditorInterface.get_command_palette()

external_command is a function that will be called with the command is executed.

var command_callable = Callable(self, "external_command").bind(arguments) command_palette.add_command("command", "test/command",command_callable)

Note: This class shouldn't be instantiated directly. Instead, access the singleton using EditorInterface.get_command_palette().

Properties

Methods


Method Descriptions

void add_command(command_name: String, key_name: String, binded_callable: Callable, shortcut_text: String = "None") 🔗

Adds a custom command to EditorCommandPalette.


void remove_command(key_name: String) 🔗

Removes the custom command from EditorCommandPalette.