:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorInspector.xml. .. _class_EditorInspector: EditorInspector =============== **Inherits:** :ref:`ScrollContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` A control used to edit properties of an object. .. rst-class:: classref-introduction-group Description ----------- This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the **EditorInspector** used in the editor's Inspector dock, use :ref:`EditorInterface.get_inspector()`. \ **EditorInspector** will show properties in the same order as the array returned by :ref:`Object.get_property_list()`. If a property's name is path-like (i.e. if it contains forward slashes), **EditorInspector** will create nested sections for "directories" along the path. For example, if a property is named ``highlighting/gdscript/node_path_color``, it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section. If a property has :ref:`@GlobalScope.PROPERTY_USAGE_GROUP` usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. **EditorInspector** will create a top-level section for each group. For example, if a property with group usage is named ``Collide With`` and its hint string is ``collide_with_``, a subsequent ``collide_with_area`` property will be shown as "Area" inside the "Collide With" section. There is also a special case: when the hint string contains the name of a property, that property is grouped too. This is mainly to help grouping properties like ``font``, ``font_color`` and ``font_size`` (using the hint string ``font_``). If a property has :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP` usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup. \ **Note:** Unlike sections created from path-like property names, **EditorInspector** won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | draw_focus_border | ``true`` (overrides :ref:`ScrollContainer`) | +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | follow_focus | ``true`` (overrides :ref:`ScrollContainer`) | +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`ScrollMode` | horizontal_scroll_mode | ``0`` (overrides :ref:`ScrollContainer`) | +----------------------------------------------------+------------------------+-------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`edit`\ (\ object\: :ref:`Object`\ ) | +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_edited_object`\ (\ ) | +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_selected_path`\ (\ ) |const| | +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorProperty` | :ref:`instantiate_property_editor`\ (\ object\: :ref:`Object`, type\: :ref:`Variant.Type`, path\: :ref:`String`, hint\: :ref:`PropertyHint`, hint_text\: :ref:`String`, usage\: :ref:`int`, wide\: :ref:`bool` = false\ ) |static| | +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_EditorInspector_signal_edited_object_changed: .. rst-class:: classref-signal **edited_object_changed**\ (\ ) :ref:`🔗` Emitted when the object being edited by the inspector has changed. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_signal_object_id_selected: .. rst-class:: classref-signal **object_id_selected**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Emitted when the Edit button of an :ref:`Object` has been pressed in the inspector. This is mainly used in the remote scene tree Inspector. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_signal_property_deleted: .. rst-class:: classref-signal **property_deleted**\ (\ property\: :ref:`String`\ ) :ref:`🔗` Emitted when a property is removed from the inspector. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_signal_property_edited: .. rst-class:: classref-signal **property_edited**\ (\ property\: :ref:`String`\ ) :ref:`🔗` Emitted when a property is edited in the inspector. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_signal_property_keyed: .. rst-class:: classref-signal **property_keyed**\ (\ property\: :ref:`String`, value\: :ref:`Variant`, advance\: :ref:`bool`\ ) :ref:`🔗` Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_signal_property_selected: .. rst-class:: classref-signal **property_selected**\ (\ property\: :ref:`String`\ ) :ref:`🔗` Emitted when a property is selected in the inspector. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_signal_property_toggled: .. rst-class:: classref-signal **property_toggled**\ (\ property\: :ref:`String`, checked\: :ref:`bool`\ ) :ref:`🔗` Emitted when a boolean property is toggled in the inspector. \ **Note:** This signal is never emitted if the internal ``autoclear`` property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_signal_resource_selected: .. rst-class:: classref-signal **resource_selected**\ (\ resource\: :ref:`Resource`, path\: :ref:`String`\ ) :ref:`🔗` Emitted when a resource is selected in the inspector. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_signal_restart_requested: .. rst-class:: classref-signal **restart_requested**\ (\ ) :ref:`🔗` Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorInspector_method_edit: .. rst-class:: classref-method |void| **edit**\ (\ object\: :ref:`Object`\ ) :ref:`🔗` Shows the properties of the given ``object`` in this inspector for editing. To clear the inspector, call this method with ``null``. \ **Note:** If you want to edit an object in the editor's main inspector, use the ``edit_*`` methods in :ref:`EditorInterface` instead. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_method_get_edited_object: .. rst-class:: classref-method :ref:`Object` **get_edited_object**\ (\ ) :ref:`🔗` Returns the object currently selected in this inspector. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_method_get_selected_path: .. rst-class:: classref-method :ref:`String` **get_selected_path**\ (\ ) |const| :ref:`🔗` Gets the path of the currently selected property. .. rst-class:: classref-item-separator ---- .. _class_EditorInspector_method_instantiate_property_editor: .. rst-class:: classref-method :ref:`EditorProperty` **instantiate_property_editor**\ (\ object\: :ref:`Object`, type\: :ref:`Variant.Type`, path\: :ref:`String`, hint\: :ref:`PropertyHint`, hint_text\: :ref:`String`, usage\: :ref:`int`, wide\: :ref:`bool` = false\ ) |static| :ref:`🔗` Creates a property editor that can be used by plugin UI to edit the specified property of an ``object``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`