EditorInspectorPlugin

Inherits: RefCounted < Object

Plugin for adding custom property editors on inspector.

Description

These plugins allow 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

bool

_can_handle ( Variant object ) virtual const

void

_parse_begin ( ) virtual

void

_parse_category ( Object object, String category ) virtual

void

_parse_end ( ) virtual

bool

_parse_property ( Object object, int type, String name, int hint_type, String hint_string, int usage_flags, bool wide ) virtual

void

add_custom_control ( Control control )

void

add_property_editor ( String property, Control editor )

void

add_property_editor_for_multiple_properties ( String label, PackedStringArray properties, Control editor )

Method Descriptions

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


  • void _parse_begin ( ) virtual

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


  • void _parse_category ( Object object, String category ) virtual


  • 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.


  • void add_custom_control ( Control control )

Adds a custom control, which is not necessarily a property editor.


Adds a property editor for an individual property. The editor control must extend EditorProperty.


Adds an editor that allows modifying multiple properties. The editor control must extend EditorProperty.