EditorInspectorPlugin

Inherits: Reference < Object

Plugin for adding custom property editors on inspector.

Description

This plugins allows adding custom property editors to EditorInspector.

Plugins are registered via EditorPlugin.add_inspector_plugin.

When an object is edited, the can_handle function is called and must return true if the object type is supported.

If supported, the function parse_begin will be called, allowing to place custom controls at the beginning of the class.

Subsequently, the parse_category and parse_property are called for every category and property. They offer the ability to add custom controls to the inspector too.

Finally parse_end will be called.

On each of these calls, the “add” functions can be called.

Methods

voidadd_custom_control ( Control control )
voidadd_property_editor ( String property, Control editor )
voidadd_property_editor_for_multiple_properties ( String label, PoolStringArray properties, Control editor )
boolcan_handle ( Object object ) virtual
voidparse_begin ( Object object ) virtual
voidparse_category ( Object object, String category ) virtual
voidparse_end ( ) virtual
boolparse_property ( Object object, int type, String path, int hint, String hint_text, int usage ) virtual

Method Descriptions

  • void add_custom_control ( Control control )

Adds a custom control, not necessarily a property editor.


Adds a property editor, this must inherit EditorProperty.


Adds an editor that allows modifying multiple properties, this must inherit EditorProperty.


Returns true if this object can be handled by this plugin.


  • void parse_begin ( Object object ) virtual

Called to allow adding controls at the beginning of the list.


  • void parse_category ( Object object, String category ) virtual

Called to allow adding controls at the beginning of the category.


  • void parse_end ( ) virtual

Called to allow adding controls at the end of the list.


Called to allow adding property specific editors to the inspector. Usually these inherit EditorProperty. Returning true removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.