Skip to content

Adds ContextMenuSlot::CONTEXT_SLOT_INSPECTOR_PROPERTY to EditorContextMenuPlugin#118187

Open
SirLich wants to merge 1 commit intogodotengine:masterfrom
SirLich:feature/context-slot-inspector-property
Open

Adds ContextMenuSlot::CONTEXT_SLOT_INSPECTOR_PROPERTY to EditorContextMenuPlugin#118187
SirLich wants to merge 1 commit intogodotengine:masterfrom
SirLich:feature/context-slot-inspector-property

Conversation

@SirLich
Copy link
Copy Markdown
Contributor

@SirLich SirLich commented Apr 4, 2026

Allows EditorContextMenuPlugin to be injected into the right-click menu of properties in the inspector. The argument to popup_menu will be a string-name of the selected property (e.g., visible), and the callback will provide you an editor property (e.g., EditorPropertyBool), from which you can extract any information you need.

Note: The inspector has three seperate popup menus, one each for: Properties, Sections, and Categories. This PR binds CONTEXT_SLOT_INSPECTOR_PROPERTY to properties only. I didn't view it as suitable to support Sections or Categories, because it makes the argument to _popup_menu and the callback too dynamic (in one case, it's a property name, in another a section/category name).

No AI was used in the creation of this PR.

Closes godotengine/godot-proposals#14608

@SirLich SirLich requested review from a team as code owners April 4, 2026 14:30
@SirLich SirLich force-pushed the feature/context-slot-inspector-property branch from c488d47 to 869473b Compare April 4, 2026 15:07
@Nintorch Nintorch added this to the 4.x milestone Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ContextMenuSlot::CONTEXT_SLOT_INSPECTOR_PROPERTY to EditorContextMenuPlugin

2 participants