2018-05-28 12:53:15 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2021-06-04 16:03:15 +00:00
<class name= "EditorInspectorPlugin" inherits= "RefCounted" version= "4.0" >
2018-05-28 12:53:15 +00:00
<brief_description >
2019-04-23 19:39:09 +00:00
Plugin for adding custom property editors on inspector.
2018-05-28 12:53:15 +00:00
</brief_description>
<description >
2021-03-18 11:04:28 +00:00
These plugins allow adding custom property editors to [EditorInspector].
2019-04-24 05:49:38 +00:00
Plugins are registered via [method EditorPlugin.add_inspector_plugin].
2021-05-15 21:48:59 +00:00
When an object is edited, the [method _can_handle] function is called and must return [code]true[/code] if the object type is supported.
If supported, the function [method _parse_begin] will be called, allowing to place custom controls at the beginning of the class.
Subsequently, the [method _parse_category] and [method _parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too.
Finally, [method _parse_end] will be called.
2019-04-24 05:49:38 +00:00
On each of these calls, the "add" functions can be called.
2018-05-28 12:53:15 +00:00
</description>
<tutorials >
2021-08-06 18:01:00 +00:00
<link title= "Inspector plugins" > https://docs.godotengine.org/en/latest/tutorials/plugins/editor/inspector_plugins.html</link>
2018-05-28 12:53:15 +00:00
</tutorials>
<methods >
2021-08-22 01:52:44 +00:00
<method name= "_can_handle" qualifiers= "virtual const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2021-08-22 01:52:44 +00:00
<argument index= "0" name= "object" type= "Variant" />
2018-05-28 12:53:15 +00:00
<description >
2021-05-15 21:48:59 +00:00
Returns [code]true[/code] if this object can be handled by this plugin.
2018-05-28 12:53:15 +00:00
</description>
</method>
2021-05-15 21:48:59 +00:00
<method name= "_parse_begin" qualifiers= "virtual" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2018-05-28 12:53:15 +00:00
<description >
2021-05-15 21:48:59 +00:00
Called to allow adding controls at the beginning of the list.
2018-05-28 12:53:15 +00:00
</description>
</method>
2021-05-15 21:48:59 +00:00
<method name= "_parse_category" qualifiers= "virtual" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2021-08-22 01:52:44 +00:00
<argument index= "0" name= "object" type= "Object" />
<argument index= "1" name= "category" type= "String" />
2018-05-28 12:53:15 +00:00
<description >
</description>
</method>
2021-05-15 21:48:59 +00:00
<method name= "_parse_end" qualifiers= "virtual" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2018-05-28 12:53:15 +00:00
<description >
2021-05-15 21:48:59 +00:00
Called to allow adding controls at the end of the list.
2018-05-28 12:53:15 +00:00
</description>
</method>
2021-05-15 21:48:59 +00:00
<method name= "_parse_property" qualifiers= "virtual" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2021-08-22 01:52:44 +00:00
<argument index= "0" name= "object" type= "Object" />
<argument index= "1" name= "type" type= "int" />
<argument index= "2" name= "name" type= "String" />
<argument index= "3" name= "hint_type" type= "int" />
<argument index= "4" name= "hint_string" type= "String" />
<argument index= "5" name= "usage_flags" type= "int" />
<argument index= "6" name= "wide" type= "bool" />
2018-05-28 12:53:15 +00:00
<description >
2021-05-15 21:48:59 +00:00
Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
2018-05-28 12:53:15 +00:00
</description>
</method>
2021-05-15 21:48:59 +00:00
<method name= "add_custom_control" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
<argument index= "0" name= "control" type= "Control" />
2018-05-28 12:53:15 +00:00
<description >
2021-08-06 18:01:00 +00:00
Adds a custom control, which is not necessarily a property editor.
2018-05-28 12:53:15 +00:00
</description>
</method>
2021-05-15 21:48:59 +00:00
<method name= "add_property_editor" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
<argument index= "0" name= "property" type= "String" />
<argument index= "1" name= "editor" type= "Control" />
2018-05-28 12:53:15 +00:00
<description >
2021-08-06 18:01:00 +00:00
Adds a property editor for an individual property. The [code]editor[/code] control must extend [EditorProperty].
2018-05-28 12:53:15 +00:00
</description>
</method>
2021-05-15 21:48:59 +00:00
<method name= "add_property_editor_for_multiple_properties" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
<argument index= "0" name= "label" type= "String" />
<argument index= "1" name= "properties" type= "PackedStringArray" />
<argument index= "2" name= "editor" type= "Control" />
2018-05-28 12:53:15 +00:00
<description >
2021-08-06 18:01:00 +00:00
Adds an editor that allows modifying multiple properties. The [code]editor[/code] control must extend [EditorProperty].
2018-05-28 12:53:15 +00:00
</description>
</method>
</methods>
</class>