Skip to content

classref: Sync with current master branch (34f005d) #10948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion classes/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -3889,11 +3889,23 @@ Hints that a property will be changed on its own after setting, such as :ref:`Au

Hints that a boolean property will enable the feature associated with the group that it occurs in. Only works within a group or subgroup.

.. _class_@GlobalScope_constant_PROPERTY_HINT_INPUT_NAME:

.. rst-class:: classref-enumeration-constant

:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_INPUT_NAME** = ``43``

Hints that a :ref:`String<class_String>` or :ref:`StringName<class_StringName>` property is the name of an input action. This allows the selection of any action name from the Input Map in the Project Settings. The hint string may contain two options separated by commas:

- If it contains ``"show_builtin"``, built-in input actions are included in the selection.

- If it contains ``"loose_mode"``, loose mode is enabled. This allows inserting any action name even if it's not present in the input map.

.. _class_@GlobalScope_constant_PROPERTY_HINT_MAX:

.. rst-class:: classref-enumeration-constant

:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_MAX** = ``43``
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_MAX** = ``44``

Represents the size of the :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` enum.

Expand Down
64 changes: 62 additions & 2 deletions classes/class_basematerial3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ Properties
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`backlight_texture<class_BaseMaterial3D_property_backlight_texture>` | |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`bool<class_bool>` | :ref:`bent_normal_enabled<class_BaseMaterial3D_property_bent_normal_enabled>` | ``false`` |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`Texture2D<class_Texture2D>` | :ref:`bent_normal_texture<class_BaseMaterial3D_property_bent_normal_texture>` | |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`bool<class_bool>` | :ref:`billboard_keep_scale<class_BaseMaterial3D_property_billboard_keep_scale>` | ``false`` |
+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+
| :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` | :ref:`billboard_mode<class_BaseMaterial3D_property_billboard_mode>` | ``0`` |
Expand Down Expand Up @@ -353,6 +357,14 @@ Texture specifying per-pixel emission color.

Texture specifying per-pixel normal vector.

.. _class_BaseMaterial3D_constant_TEXTURE_BENT_NORMAL:

.. rst-class:: classref-enumeration-constant

:ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_BENT_NORMAL** = ``18``

Texture specifying per-pixel bent normal vector.

.. _class_BaseMaterial3D_constant_TEXTURE_RIM:

.. rst-class:: classref-enumeration-constant
Expand Down Expand Up @@ -461,7 +473,7 @@ Texture holding ambient occlusion, roughness, and metallic.

.. rst-class:: classref-enumeration-constant

:ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_MAX** = ``18``
:ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` **TEXTURE_MAX** = ``19``

Represents the size of the :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>` enum.

Expand Down Expand Up @@ -763,11 +775,19 @@ Constant for setting :ref:`refraction_enabled<class_BaseMaterial3D_property_refr

Constant for setting :ref:`detail_enabled<class_BaseMaterial3D_property_detail_enabled>`.

.. _class_BaseMaterial3D_constant_FEATURE_BENT_NORMAL_MAPPING:

.. rst-class:: classref-enumeration-constant

:ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_BENT_NORMAL_MAPPING** = ``12``

Constant for setting :ref:`bent_normal_enabled<class_BaseMaterial3D_property_bent_normal_enabled>`.

.. _class_BaseMaterial3D_constant_FEATURE_MAX:

.. rst-class:: classref-enumeration-constant

:ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_MAX** = ``12``
:ref:`Feature<enum_BaseMaterial3D_Feature>` **FEATURE_MAX** = ``13``

Represents the size of the :ref:`Feature<enum_BaseMaterial3D_Feature>` enum.

Expand Down Expand Up @@ -1715,6 +1735,46 @@ Texture used to control the backlight effect per-pixel. Added to :ref:`backlight

----

.. _class_BaseMaterial3D_property_bent_normal_enabled:

.. rst-class:: classref-property

:ref:`bool<class_bool>` **bent_normal_enabled** = ``false`` :ref:`🔗<class_BaseMaterial3D_property_bent_normal_enabled>`

.. rst-class:: classref-property-setget

- |void| **set_feature**\ (\ feature\: :ref:`Feature<enum_BaseMaterial3D_Feature>`, enable\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_feature**\ (\ feature\: :ref:`Feature<enum_BaseMaterial3D_Feature>`\ ) |const|

If ``true``, the bent normal map is enabled. This allows for more accurate indirect lighting and specular occlusion.

.. rst-class:: classref-item-separator

----

.. _class_BaseMaterial3D_property_bent_normal_texture:

.. rst-class:: classref-property

:ref:`Texture2D<class_Texture2D>` **bent_normal_texture** :ref:`🔗<class_BaseMaterial3D_property_bent_normal_texture>`

.. rst-class:: classref-property-setget

- |void| **set_texture**\ (\ param\: :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>`, texture\: :ref:`Texture2D<class_Texture2D>`\ )
- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ param\: :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>`\ ) |const|

Texture that specifies the average direction of incoming ambient light at a given pixel. The :ref:`bent_normal_texture<class_BaseMaterial3D_property_bent_normal_texture>` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`bent_normal_texture<class_BaseMaterial3D_property_bent_normal_texture>` is oriented around the surface normal provided by the :ref:`Mesh<class_Mesh>`.

\ **Note:** A bent normal map is different from a regular normal map. When baking a bent normal map make sure to use **a cosine distribution** for the bent normal map to work correctly.

\ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the shading produced by the bent normal map will not look correct. If creating geometry with :ref:`SurfaceTool<class_SurfaceTool>`, you can use :ref:`SurfaceTool.generate_normals()<class_SurfaceTool_method_generate_normals>` and :ref:`SurfaceTool.generate_tangents()<class_SurfaceTool_method_generate_tangents>` to automatically generate normals and tangents respectively.

\ **Note:** Godot expects the bent normal map to use X+, Y+, and Z+ coordinates. See `this page <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>`__ for a comparison of normal map coordinates expected by popular engines.

.. rst-class:: classref-item-separator

----

.. _class_BaseMaterial3D_property_billboard_keep_scale:

.. rst-class:: classref-property
Expand Down
6 changes: 5 additions & 1 deletion classes/class_editorimportplugin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,11 @@ Gets the name to display in the import window. You should choose this name as a

:ref:`Error<enum_@GlobalScope_Error>` **_import**\ (\ source_file\: :ref:`String<class_String>`, save_path\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>`, platform_variants\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], gen_files\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\]\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__import>`

Imports ``source_file`` into ``save_path`` with the import ``options`` specified. The ``platform_variants`` and ``gen_files`` arrays will be modified by this function.
Imports ``source_file`` with the import ``options`` specified. Should return :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the import is successful, other values indicate failure.

The imported resource is expected to be saved to ``save_path + "." + _get_save_extension()``. If a different variant is preferred for a :doc:`feature tag <../tutorials/export/feature_tags>`, save the variant to ``save_path + "." + tag + "." + _get_save_extension()`` and add the feature tag to ``platform_variants``.

If additional resource files are generated in the resource filesystem (``res://``), add their full path to ``gen_files`` so that the editor knows they depend on ``source_file``.

This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method.

Expand Down
2 changes: 2 additions & 0 deletions classes/class_editorscript.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Description

Scripts extending this class and implementing its :ref:`_run()<class_EditorScript_private_method__run>` method can be executed from the Script Editor's **File > Run** menu option (or by pressing :kbd:`Ctrl + Shift + X`) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using :ref:`EditorPlugin<class_EditorPlugin>`\ s instead.

If a script extending this class also has a global class name, it will be included in the editor's command palette.

\ **Note:** Extending scripts need to have ``tool`` mode enabled.

\ **Example:** Running the following script prints "Hello from the Godot Editor!":
Expand Down
14 changes: 14 additions & 0 deletions classes/class_editorsettings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,8 @@ Properties
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`text_editor/appearance/caret/type<class_EditorSettings_property_text_editor/appearance/caret/type>` |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`text_editor/appearance/enable_inline_color_picker<class_EditorSettings_property_text_editor/appearance/enable_inline_color_picker>` |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column>` |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_soft_column>` |
Expand Down Expand Up @@ -4884,6 +4886,18 @@ The shape of the caret to use in the script editor. **Line** displays a vertical

----

.. _class_EditorSettings_property_text_editor/appearance/enable_inline_color_picker:

.. rst-class:: classref-property

:ref:`bool<class_bool>` **text_editor/appearance/enable_inline_color_picker** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/enable_inline_color_picker>`

If ``true``, displays a colored button before any :ref:`Color<class_Color>` constructor in the script editor. Clicking on them allows the color to be modified through a color picker.

.. rst-class:: classref-item-separator

----

.. _class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column:

.. rst-class:: classref-property
Expand Down
Loading