mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Merge pull request #10469 from godotengine/classref/sync-bdf625b
classref: Sync with current master branch (bdf625b)
This commit is contained in:
@@ -950,6 +950,8 @@ Method Descriptions
|
||||
|
||||
:ref:`Color<class_Color>` **Color8**\ (\ r8\: :ref:`int<class_int>`, g8\: :ref:`int<class_int>`, b8\: :ref:`int<class_int>`, a8\: :ref:`int<class_int>` = 255\ ) :ref:`🔗<class_@GDScript_method_Color8>`
|
||||
|
||||
**Deprecated:** Use :ref:`Color.from_rgba8<class_Color_method_from_rgba8>` instead.
|
||||
|
||||
Returns a :ref:`Color<class_Color>` constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value. Using :ref:`Color8<class_@GDScript_method_Color8>` instead of the standard :ref:`Color<class_Color>` constructor is useful when you need to match exact color values in an :ref:`Image<class_Image>`.
|
||||
|
||||
::
|
||||
|
||||
@@ -5767,9 +5767,9 @@ Returns a human-readable name for the given :ref:`Error<enum_@GlobalScope_Error>
|
||||
::
|
||||
|
||||
print(OK) # Prints 0
|
||||
print(error_string(OK)) # Prints OK
|
||||
print(error_string(ERR_BUSY)) # Prints Busy
|
||||
print(error_string(ERR_OUT_OF_MEMORY)) # Prints Out of memory
|
||||
print(error_string(OK)) # Prints "OK"
|
||||
print(error_string(ERR_BUSY)) # Prints "Busy"
|
||||
print(error_string(ERR_OUT_OF_MEMORY)) # Prints "Out of memory"
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5934,24 +5934,24 @@ Returns the :ref:`Object<class_Object>` that corresponds to ``instance_id``. All
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var foo = "bar"
|
||||
var drink = "water"
|
||||
|
||||
func _ready():
|
||||
var id = get_instance_id()
|
||||
var inst = instance_from_id(id)
|
||||
print(inst.foo) # Prints bar
|
||||
var instance = instance_from_id(id)
|
||||
print(instance.foo) # Prints "water"
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
public partial class MyNode : Node
|
||||
{
|
||||
public string Foo { get; set; } = "bar";
|
||||
public string Drink { get; set; } = "water";
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
ulong id = GetInstanceId();
|
||||
var inst = (MyNode)InstanceFromId(Id);
|
||||
GD.Print(inst.Foo); // Prints bar
|
||||
var instance = (MyNode)InstanceFromId(Id);
|
||||
GD.Print(instance.Drink); // Prints "water"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6448,12 +6448,12 @@ Converts one or more arguments of any type to string in the best way possible an
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var a = [1, 2, 3]
|
||||
print("a", "b", a) # Prints ab[1, 2, 3]
|
||||
print("a", "b", a) # Prints "ab[1, 2, 3]"
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
Godot.Collections.Array a = [1, 2, 3];
|
||||
GD.Print("a", "b", a); // Prints ab[1, 2, 3]
|
||||
GD.Print("a", "b", a); // Prints "ab[1, 2, 3]"
|
||||
|
||||
|
||||
|
||||
@@ -6482,11 +6482,11 @@ When printing to standard output, the supported subset of BBCode is converted to
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font
|
||||
print_rich("[color=green][b]Hello world![/b][/color]") # Prints "Hello world!", in green with a bold font.
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font
|
||||
GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints "Hello world!", in green with a bold font.
|
||||
|
||||
|
||||
|
||||
@@ -6552,17 +6552,17 @@ Prints one or more arguments to strings in the best way possible to the OS termi
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
# Prints "ABC" to terminal.
|
||||
printraw("A")
|
||||
printraw("B")
|
||||
printraw("C")
|
||||
# Prints ABC to terminal
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
// Prints "ABC" to terminal.
|
||||
GD.PrintRaw("A");
|
||||
GD.PrintRaw("B");
|
||||
GD.PrintRaw("C");
|
||||
// Prints ABC to terminal
|
||||
|
||||
|
||||
|
||||
@@ -6583,11 +6583,11 @@ Prints one or more arguments to the console with a space between each argument.
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
prints("A", "B", "C") # Prints A B C
|
||||
prints("A", "B", "C") # Prints "A B C"
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
GD.PrintS("A", "B", "C"); // Prints A B C
|
||||
GD.PrintS("A", "B", "C"); // Prints "A B C"
|
||||
|
||||
|
||||
|
||||
@@ -6608,11 +6608,11 @@ Prints one or more arguments to the console with a tab between each argument.
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
printt("A", "B", "C") # Prints A B C
|
||||
printt("A", "B", "C") # Prints "A B C"
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
GD.PrintT("A", "B", "C"); // Prints A B C
|
||||
GD.PrintT("A", "B", "C"); // Prints "A B C"
|
||||
|
||||
|
||||
|
||||
@@ -6633,11 +6633,11 @@ Pushes an error message to Godot's built-in debugger and to the OS terminal.
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
push_error("test error") # Prints "test error" to debugger and terminal as error call
|
||||
push_error("test error") # Prints "test error" to debugger and terminal as an error.
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
GD.PushError("test error"); // Prints "test error" to debugger and terminal as error call
|
||||
GD.PushError("test error"); // Prints "test error" to debugger and terminal as an error.
|
||||
|
||||
|
||||
|
||||
@@ -6660,11 +6660,11 @@ Pushes a warning message to Godot's built-in debugger and to the OS terminal.
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call
|
||||
push_warning("test warning") # Prints "test warning" to debugger and terminal as a warning.
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
GD.PushWarning("test warning"); // Prints "test warning" to debugger and terminal as warning call
|
||||
GD.PushWarning("test warning"); // Prints "test warning" to debugger and terminal as a warning.
|
||||
|
||||
|
||||
|
||||
@@ -7337,9 +7337,9 @@ Returns a human-readable name of the given ``type``, using the :ref:`Variant.Typ
|
||||
|
||||
::
|
||||
|
||||
print(TYPE_INT) # Prints 2.
|
||||
print(type_string(TYPE_INT)) # Prints "int".
|
||||
print(type_string(TYPE_STRING)) # Prints "String".
|
||||
print(TYPE_INT) # Prints 2
|
||||
print(type_string(TYPE_INT)) # Prints "int"
|
||||
print(type_string(TYPE_STRING)) # Prints "String"
|
||||
|
||||
See also :ref:`typeof<class_@GlobalScope_method_typeof>`.
|
||||
|
||||
@@ -7360,10 +7360,10 @@ Returns the internal type of the given ``variable``, using the :ref:`Variant.Typ
|
||||
var json = JSON.new()
|
||||
json.parse('["a", "b", "c"]')
|
||||
var result = json.get_data()
|
||||
if typeof(result) == TYPE_ARRAY:
|
||||
print(result[0]) # Prints a
|
||||
if result is Array:
|
||||
print(result[0]) # Prints "a"
|
||||
else:
|
||||
print("Unexpected result")
|
||||
print("Unexpected result!")
|
||||
|
||||
See also :ref:`type_string<class_@GlobalScope_method_type_string>`.
|
||||
|
||||
|
||||
@@ -784,7 +784,7 @@ Returns the index of the **first** element in the array that causes ``method`` t
|
||||
return number % 2 == 0
|
||||
|
||||
func _ready():
|
||||
print([1, 3, 4, 7].find_custom(is_even.bind())) # prints 2
|
||||
print([1, 3, 4, 7].find_custom(is_even.bind())) # Prints 2
|
||||
|
||||
|
||||
|
||||
@@ -1172,10 +1172,10 @@ If :ref:`max<class_Array_method_max>` is not desirable, this method may also be
|
||||
::
|
||||
|
||||
func _ready():
|
||||
var arr = [Vector2(5, 0), Vector2(3, 4), Vector2(1, 2)]
|
||||
var arr = [Vector2i(5, 0), Vector2i(3, 4), Vector2i(1, 2)]
|
||||
|
||||
var longest_vec = arr.reduce(func(max, vec): return vec if is_length_greater(vec, max) else max)
|
||||
print(longest_vec) # Prints Vector2(3, 4).
|
||||
print(longest_vec) # Prints (3, 4)
|
||||
|
||||
func is_length_greater(a, b):
|
||||
return a.length() > b.length()
|
||||
@@ -1189,11 +1189,11 @@ This method can also be used to count how many elements in an array satisfy a ce
|
||||
|
||||
func _ready():
|
||||
var arr = [1, 2, 3, 4, 5]
|
||||
# Increment count if it's even, else leaves count the same.
|
||||
# If the current element is even, increment count, otherwise leave count the same.
|
||||
var even_count = arr.reduce(func(count, next): return count + 1 if is_even(next) else count, 0)
|
||||
print(even_count) # Prints 2
|
||||
|
||||
See also :ref:`map<class_Array_method_map>`, :ref:`filter<class_Array_method_filter>`, :ref:`any<class_Array_method_any>` and :ref:`all<class_Array_method_all>`.
|
||||
See also :ref:`map<class_Array_method_map>`, :ref:`filter<class_Array_method_filter>`, :ref:`any<class_Array_method_any>`, and :ref:`all<class_Array_method_all>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ The ``blend_shapes`` argument is an array of vertex data for each blend shape. E
|
||||
|
||||
The ``lods`` argument is a dictionary with :ref:`float<class_float>` keys and :ref:`PackedInt32Array<class_PackedInt32Array>` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used.
|
||||
|
||||
The ``flags`` argument is the bitwise or of, as required: One value of :ref:`ArrayCustomFormat<enum_Mesh_ArrayCustomFormat>` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE<class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE>`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS<class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS>`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY<class_Mesh_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY>`.
|
||||
The ``flags`` argument is the bitwise OR of, as required: One value of :ref:`ArrayCustomFormat<enum_Mesh_ArrayCustomFormat>` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE<class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE>`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS<class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS>`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY<class_Mesh_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY>`.
|
||||
|
||||
\ **Note:** When using indices, it is recommended to only use points, lines, or triangles.
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ To use **AStarGrid2D**, you only need to set the :ref:`region<class_AStarGrid2D_
|
||||
astarGrid.Region = new Rect2I(0, 0, 32, 32);
|
||||
astarGrid.CellSize = new Vector2I(16, 16);
|
||||
astarGrid.Update();
|
||||
GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
|
||||
GD.Print(astarGrid.GetPointPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
|
||||
GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // Prints [(0, 0), (1, 1), (2, 2), (3, 3), (3, 4)]
|
||||
GD.Print(astarGrid.GetPointPath(Vector2I.Zero, new Vector2I(3, 4))); // Prints [(0, 0), (16, 16), (32, 32), (48, 48), (48, 64)]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -598,7 +598,9 @@ Creates a new **Basis** with a rotation such that the forward axis (-Z) points t
|
||||
|
||||
By default, the -Z axis (camera forward) is treated as forward (implies +X is right). If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the ``target`` position.
|
||||
|
||||
The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see :ref:`orthonormalized<class_Basis_method_orthonormalized>`). The ``target`` and ``up`` vectors cannot be :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`, and cannot be parallel to each other.
|
||||
The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see :ref:`orthonormalized<class_Basis_method_orthonormalized>`).
|
||||
|
||||
The ``target`` and the ``up`` cannot be :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`, and shouldn't be colinear to avoid unintended rotation around local Z axis.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Description
|
||||
func test():
|
||||
var callable = Callable(self, "print_args")
|
||||
callable.call("hello", "world") # Prints "hello world ".
|
||||
callable.call(Vector2.UP, 42, callable) # Prints "(0.0, -1.0) 42 Node(node.gd)::print_args".
|
||||
callable.call(Vector2.UP, 42, callable) # Prints "(0.0, -1.0) 42 Node(node.gd)::print_args"
|
||||
callable.call("invalid") # Invalid call, should have at least 2 arguments.
|
||||
|
||||
.. code-tab:: csharp
|
||||
@@ -46,7 +46,7 @@ Description
|
||||
// Invalid calls fail silently.
|
||||
Callable callable = new Callable(this, MethodName.PrintArgs);
|
||||
callable.Call("hello", "world"); // Default parameter values are not supported, should have 3 arguments.
|
||||
callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.cs)::PrintArgs".
|
||||
callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.cs)::PrintArgs"
|
||||
callable.Call("invalid"); // Invalid call, should have 3 arguments.
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ In GDScript, it's possible to create lambda functions within a method. Lambda fu
|
||||
var my_lambda = func (message):
|
||||
print(message)
|
||||
|
||||
# Prints Hello everyone!
|
||||
# Prints "Hello everyone!"
|
||||
my_lambda.call("Hello everyone!")
|
||||
|
||||
# Prints "Attack!", when the button_pressed signal is emitted.
|
||||
|
||||
@@ -121,6 +121,8 @@ Methods
|
||||
+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_Color>` | :ref:`from_ok_hsl<class_Color_method_from_ok_hsl>`\ (\ h\: :ref:`float<class_float>`, s\: :ref:`float<class_float>`, l\: :ref:`float<class_float>`, alpha\: :ref:`float<class_float>` = 1.0\ ) |static| |
|
||||
+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_Color>` | :ref:`from_rgba8<class_Color_method_from_rgba8>`\ (\ r8\: :ref:`int<class_int>`, g8\: :ref:`int<class_int>`, b8\: :ref:`int<class_int>`, a8\: :ref:`int<class_int>` = 255\ ) |static| |
|
||||
+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_Color>` | :ref:`from_rgbe9995<class_Color_method_from_rgbe9995>`\ (\ rgbe\: :ref:`int<class_int>`\ ) |static| |
|
||||
+-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Color<class_Color>` | :ref:`from_string<class_Color_method_from_string>`\ (\ str\: :ref:`String<class_String>`, default\: :ref:`Color<class_Color>`\ ) |static| |
|
||||
@@ -1789,6 +1791,26 @@ Constructs a color from an `OK HSL profile <https://bottosson.github.io/posts/co
|
||||
|
||||
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Color_method_from_rgba8:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Color<class_Color>` **from_rgba8**\ (\ r8\: :ref:`int<class_int>`, g8\: :ref:`int<class_int>`, b8\: :ref:`int<class_int>`, a8\: :ref:`int<class_int>` = 255\ ) |static| :ref:`🔗<class_Color_method_from_rgba8>`
|
||||
|
||||
Returns a **Color** constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value.
|
||||
|
||||
::
|
||||
|
||||
var red = Color.from_rgba8(255, 0, 0) # Same as Color(1, 0, 0).
|
||||
var dark_blue = Color.from_rgba8(0, 0, 51) # Same as Color(0, 0, 0.2).
|
||||
var my_color = Color.from_rgba8(306, 255, 0, 102) # Same as Color(1.2, 1, 0, 0.4).
|
||||
|
||||
\ **Note:** Due to the lower precision of :ref:`from_rgba8<class_Color_method_from_rgba8>` compared to the standard **Color** constructor, a color created with :ref:`from_rgba8<class_Color_method_from_rgba8>` will generally not be equal to the same color created with the standard **Color** constructor. Use :ref:`is_equal_approx<class_Color_method_is_equal_approx>` for comparisons to avoid issues with floating-point precision error.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
@@ -166,7 +166,7 @@ Add a submenu to the context menu of the plugin's specified slot. The submenu is
|
||||
popup_menu.add_item("White")
|
||||
popup_menu.id_pressed.connect(_on_color_submenu_option)
|
||||
|
||||
add_context_menu_item("Set Node Color", popup_menu)
|
||||
add_context_submenu_item("Set Node Color", popup_menu)
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -59,119 +59,119 @@ Methods
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`edit_node<class_EditorInterface_method_edit_node>`\ (\ node\: :ref:`Node<class_Node>`\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`edit_resource<class_EditorInterface_method_edit_resource>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`edit_script<class_EditorInterface_method_edit_script>`\ (\ script\: :ref:`Script<class_Script>`, line\: :ref:`int<class_int>` = -1, column\: :ref:`int<class_int>` = 0, grab_focus\: :ref:`bool<class_bool>` = true\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Control<class_Control>` | :ref:`get_base_control<class_EditorInterface_method_get_base_control>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorCommandPalette<class_EditorCommandPalette>` | :ref:`get_command_palette<class_EditorInterface_method_get_command_palette>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_current_directory<class_EditorInterface_method_get_current_directory>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_current_feature_profile<class_EditorInterface_method_get_current_feature_profile>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_current_path<class_EditorInterface_method_get_current_path>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Node<class_Node>` | :ref:`get_edited_scene_root<class_EditorInterface_method_get_edited_scene_root>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_editor_main_screen<class_EditorInterface_method_get_editor_main_screen>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorPaths<class_EditorPaths>` | :ref:`get_editor_paths<class_EditorInterface_method_get_editor_paths>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_editor_scale<class_EditorInterface_method_get_editor_scale>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorSettings<class_EditorSettings>` | :ref:`get_editor_settings<class_EditorInterface_method_get_editor_settings>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Theme<class_Theme>` | :ref:`get_editor_theme<class_EditorInterface_method_get_editor_theme>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorToaster<class_EditorToaster>` | :ref:`get_editor_toaster<class_EditorInterface_method_get_editor_toaster>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` | :ref:`get_editor_undo_redo<class_EditorInterface_method_get_editor_undo_redo>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`SubViewport<class_SubViewport>` | :ref:`get_editor_viewport_2d<class_EditorInterface_method_get_editor_viewport_2d>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`SubViewport<class_SubViewport>` | :ref:`get_editor_viewport_3d<class_EditorInterface_method_get_editor_viewport_3d>`\ (\ idx\: :ref:`int<class_int>` = 0\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`FileSystemDock<class_FileSystemDock>` | :ref:`get_file_system_dock<class_EditorInterface_method_get_file_system_dock>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorInspector<class_EditorInspector>` | :ref:`get_inspector<class_EditorInterface_method_get_inspector>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_open_scenes<class_EditorInterface_method_get_open_scenes>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_playing_scene<class_EditorInterface_method_get_playing_scene>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorFileSystem<class_EditorFileSystem>` | :ref:`get_resource_filesystem<class_EditorInterface_method_get_resource_filesystem>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorResourcePreview<class_EditorResourcePreview>` | :ref:`get_resource_previewer<class_EditorInterface_method_get_resource_previewer>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`ScriptEditor<class_ScriptEditor>` | :ref:`get_script_editor<class_EditorInterface_method_get_script_editor>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_selected_paths<class_EditorInterface_method_get_selected_paths>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorSelection<class_EditorSelection>` | :ref:`get_selection<class_EditorInterface_method_get_selection>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`inspect_object<class_EditorInterface_method_inspect_object>`\ (\ object\: :ref:`Object<class_Object>`, for_property\: :ref:`String<class_String>` = "", inspector_only\: :ref:`bool<class_bool>` = false\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_multi_window_enabled<class_EditorInterface_method_is_multi_window_enabled>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_playing_scene<class_EditorInterface_method_is_playing_scene>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_plugin_enabled<class_EditorInterface_method_is_plugin_enabled>`\ (\ plugin\: :ref:`String<class_String>`\ ) |const| |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\] | :ref:`make_mesh_previews<class_EditorInterface_method_make_mesh_previews>`\ (\ meshes\: :ref:`Array<class_Array>`\[:ref:`Mesh<class_Mesh>`\], preview_size\: :ref:`int<class_int>`\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`mark_scene_as_unsaved<class_EditorInterface_method_mark_scene_as_unsaved>`\ (\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`open_scene_from_path<class_EditorInterface_method_open_scene_from_path>`\ (\ scene_filepath\: :ref:`String<class_String>`, set_inherited\: :ref:`bool<class_bool>` = false\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`play_current_scene<class_EditorInterface_method_play_current_scene>`\ (\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`play_custom_scene<class_EditorInterface_method_play_custom_scene>`\ (\ scene_filepath\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`play_main_scene<class_EditorInterface_method_play_main_scene>`\ (\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_create_dialog<class_EditorInterface_method_popup_create_dialog>`\ (\ callback\: :ref:`Callable<class_Callable>`, base_type\: :ref:`StringName<class_StringName>` = "", current_type\: :ref:`String<class_String>` = "", dialog_title\: :ref:`String<class_String>` = "", type_blocklist\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = [], type_suffixes\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_dialog<class_EditorInterface_method_popup_dialog>`\ (\ dialog\: :ref:`Window<class_Window>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_dialog_centered<class_EditorInterface_method_popup_dialog_centered>`\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_dialog_centered_clamped<class_EditorInterface_method_popup_dialog_centered_clamped>`\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_dialog_centered_ratio<class_EditorInterface_method_popup_dialog_centered_ratio>`\ (\ dialog\: :ref:`Window<class_Window>`, ratio\: :ref:`float<class_float>` = 0.8\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_method_selector<class_EditorInterface_method_popup_method_selector>`\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, current_value\: :ref:`String<class_String>` = ""\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_node_selector<class_EditorInterface_method_popup_node_selector>`\ (\ callback\: :ref:`Callable<class_Callable>`, valid_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = [], current_value\: :ref:`Node<class_Node>` = null\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_property_selector<class_EditorInterface_method_popup_property_selector>`\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, type_filter\: :ref:`PackedInt32Array<class_PackedInt32Array>` = PackedInt32Array(), current_value\: :ref:`String<class_String>` = ""\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_quick_open<class_EditorInterface_method_popup_quick_open>`\ (\ callback\: :ref:`Callable<class_Callable>`, base_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`reload_scene_from_path<class_EditorInterface_method_reload_scene_from_path>`\ (\ scene_filepath\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`restart_editor<class_EditorInterface_method_restart_editor>`\ (\ save\: :ref:`bool<class_bool>` = true\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`save_all_scenes<class_EditorInterface_method_save_all_scenes>`\ (\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_scene<class_EditorInterface_method_save_scene>`\ (\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`save_scene_as<class_EditorInterface_method_save_scene_as>`\ (\ path\: :ref:`String<class_String>`, with_preview\: :ref:`bool<class_bool>` = true\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`select_file<class_EditorInterface_method_select_file>`\ (\ file\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_current_feature_profile<class_EditorInterface_method_set_current_feature_profile>`\ (\ profile_name\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_main_screen_editor<class_EditorInterface_method_set_main_screen_editor>`\ (\ name\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_plugin_enabled<class_EditorInterface_method_set_plugin_enabled>`\ (\ plugin\: :ref:`String<class_String>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`stop_playing_scene<class_EditorInterface_method_stop_playing_scene>`\ (\ ) |
|
||||
+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`edit_node<class_EditorInterface_method_edit_node>`\ (\ node\: :ref:`Node<class_Node>`\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`edit_resource<class_EditorInterface_method_edit_resource>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`edit_script<class_EditorInterface_method_edit_script>`\ (\ script\: :ref:`Script<class_Script>`, line\: :ref:`int<class_int>` = -1, column\: :ref:`int<class_int>` = 0, grab_focus\: :ref:`bool<class_bool>` = true\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Control<class_Control>` | :ref:`get_base_control<class_EditorInterface_method_get_base_control>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorCommandPalette<class_EditorCommandPalette>` | :ref:`get_command_palette<class_EditorInterface_method_get_command_palette>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_current_directory<class_EditorInterface_method_get_current_directory>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_current_feature_profile<class_EditorInterface_method_get_current_feature_profile>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_current_path<class_EditorInterface_method_get_current_path>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Node<class_Node>` | :ref:`get_edited_scene_root<class_EditorInterface_method_get_edited_scene_root>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_editor_main_screen<class_EditorInterface_method_get_editor_main_screen>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorPaths<class_EditorPaths>` | :ref:`get_editor_paths<class_EditorInterface_method_get_editor_paths>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_editor_scale<class_EditorInterface_method_get_editor_scale>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorSettings<class_EditorSettings>` | :ref:`get_editor_settings<class_EditorInterface_method_get_editor_settings>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Theme<class_Theme>` | :ref:`get_editor_theme<class_EditorInterface_method_get_editor_theme>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorToaster<class_EditorToaster>` | :ref:`get_editor_toaster<class_EditorInterface_method_get_editor_toaster>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` | :ref:`get_editor_undo_redo<class_EditorInterface_method_get_editor_undo_redo>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`SubViewport<class_SubViewport>` | :ref:`get_editor_viewport_2d<class_EditorInterface_method_get_editor_viewport_2d>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`SubViewport<class_SubViewport>` | :ref:`get_editor_viewport_3d<class_EditorInterface_method_get_editor_viewport_3d>`\ (\ idx\: :ref:`int<class_int>` = 0\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`FileSystemDock<class_FileSystemDock>` | :ref:`get_file_system_dock<class_EditorInterface_method_get_file_system_dock>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorInspector<class_EditorInspector>` | :ref:`get_inspector<class_EditorInterface_method_get_inspector>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_open_scenes<class_EditorInterface_method_get_open_scenes>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`get_playing_scene<class_EditorInterface_method_get_playing_scene>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorFileSystem<class_EditorFileSystem>` | :ref:`get_resource_filesystem<class_EditorInterface_method_get_resource_filesystem>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorResourcePreview<class_EditorResourcePreview>` | :ref:`get_resource_previewer<class_EditorInterface_method_get_resource_previewer>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`ScriptEditor<class_ScriptEditor>` | :ref:`get_script_editor<class_EditorInterface_method_get_script_editor>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_selected_paths<class_EditorInterface_method_get_selected_paths>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`EditorSelection<class_EditorSelection>` | :ref:`get_selection<class_EditorInterface_method_get_selection>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`inspect_object<class_EditorInterface_method_inspect_object>`\ (\ object\: :ref:`Object<class_Object>`, for_property\: :ref:`String<class_String>` = "", inspector_only\: :ref:`bool<class_bool>` = false\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_multi_window_enabled<class_EditorInterface_method_is_multi_window_enabled>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_playing_scene<class_EditorInterface_method_is_playing_scene>`\ (\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_plugin_enabled<class_EditorInterface_method_is_plugin_enabled>`\ (\ plugin\: :ref:`String<class_String>`\ ) |const| |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\] | :ref:`make_mesh_previews<class_EditorInterface_method_make_mesh_previews>`\ (\ meshes\: :ref:`Array<class_Array>`\[:ref:`Mesh<class_Mesh>`\], preview_size\: :ref:`int<class_int>`\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`mark_scene_as_unsaved<class_EditorInterface_method_mark_scene_as_unsaved>`\ (\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`open_scene_from_path<class_EditorInterface_method_open_scene_from_path>`\ (\ scene_filepath\: :ref:`String<class_String>`, set_inherited\: :ref:`bool<class_bool>` = false\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`play_current_scene<class_EditorInterface_method_play_current_scene>`\ (\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`play_custom_scene<class_EditorInterface_method_play_custom_scene>`\ (\ scene_filepath\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`play_main_scene<class_EditorInterface_method_play_main_scene>`\ (\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_create_dialog<class_EditorInterface_method_popup_create_dialog>`\ (\ callback\: :ref:`Callable<class_Callable>`, base_type\: :ref:`StringName<class_StringName>` = "", current_type\: :ref:`String<class_String>` = "", dialog_title\: :ref:`String<class_String>` = "", type_blocklist\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_dialog<class_EditorInterface_method_popup_dialog>`\ (\ dialog\: :ref:`Window<class_Window>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_dialog_centered<class_EditorInterface_method_popup_dialog_centered>`\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_dialog_centered_clamped<class_EditorInterface_method_popup_dialog_centered_clamped>`\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_dialog_centered_ratio<class_EditorInterface_method_popup_dialog_centered_ratio>`\ (\ dialog\: :ref:`Window<class_Window>`, ratio\: :ref:`float<class_float>` = 0.8\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_method_selector<class_EditorInterface_method_popup_method_selector>`\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, current_value\: :ref:`String<class_String>` = ""\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_node_selector<class_EditorInterface_method_popup_node_selector>`\ (\ callback\: :ref:`Callable<class_Callable>`, valid_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = [], current_value\: :ref:`Node<class_Node>` = null\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_property_selector<class_EditorInterface_method_popup_property_selector>`\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, type_filter\: :ref:`PackedInt32Array<class_PackedInt32Array>` = PackedInt32Array(), current_value\: :ref:`String<class_String>` = ""\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`popup_quick_open<class_EditorInterface_method_popup_quick_open>`\ (\ callback\: :ref:`Callable<class_Callable>`, base_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`reload_scene_from_path<class_EditorInterface_method_reload_scene_from_path>`\ (\ scene_filepath\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`restart_editor<class_EditorInterface_method_restart_editor>`\ (\ save\: :ref:`bool<class_bool>` = true\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`save_all_scenes<class_EditorInterface_method_save_all_scenes>`\ (\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_scene<class_EditorInterface_method_save_scene>`\ (\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`save_scene_as<class_EditorInterface_method_save_scene_as>`\ (\ path\: :ref:`String<class_String>`, with_preview\: :ref:`bool<class_bool>` = true\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`select_file<class_EditorInterface_method_select_file>`\ (\ file\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_current_feature_profile<class_EditorInterface_method_set_current_feature_profile>`\ (\ profile_name\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_main_screen_editor<class_EditorInterface_method_set_main_screen_editor>`\ (\ name\: :ref:`String<class_String>`\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_plugin_enabled<class_EditorInterface_method_set_plugin_enabled>`\ (\ plugin\: :ref:`String<class_String>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`stop_playing_scene<class_EditorInterface_method_stop_playing_scene>`\ (\ ) |
|
||||
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -697,7 +697,7 @@ Plays the main scene.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **popup_create_dialog**\ (\ callback\: :ref:`Callable<class_Callable>`, base_type\: :ref:`StringName<class_StringName>` = "", current_type\: :ref:`String<class_String>` = "", dialog_title\: :ref:`String<class_String>` = "", type_blocklist\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = [], type_suffixes\: :ref:`Dictionary<class_Dictionary>` = {}\ ) :ref:`🔗<class_EditorInterface_method_popup_create_dialog>`
|
||||
|void| **popup_create_dialog**\ (\ callback\: :ref:`Callable<class_Callable>`, base_type\: :ref:`StringName<class_StringName>` = "", current_type\: :ref:`String<class_String>` = "", dialog_title\: :ref:`String<class_String>` = "", type_blocklist\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_EditorInterface_method_popup_create_dialog>`
|
||||
|
||||
**Experimental:** This method may be changed or removed in future versions.
|
||||
|
||||
@@ -713,22 +713,6 @@ The ``dialog_title`` allows you to define a custom title for the dialog. This is
|
||||
|
||||
The ``type_blocklist`` contains a list of type names, and the types in the blocklist will be hidden from the create dialog.
|
||||
|
||||
The ``type_suffixes`` is a dictionary, with keys being :ref:`StringName<class_StringName>`\ s and values being :ref:`String<class_String>`\ s. Custom suffixes override the default suffixes which are file names of their scripts. For example, if you set a custom suffix as "Custom Suffix" for a global script type,
|
||||
|
||||
.. code:: text
|
||||
|
||||
Node
|
||||
|- MyCustomNode (my_custom_node.gd)
|
||||
|
||||
will be
|
||||
|
||||
.. code:: text
|
||||
|
||||
Node
|
||||
|- MyCustomNode (Custom Suffix)
|
||||
|
||||
Bear in mind that when a built-in type does not have any custom suffix, its suffix will be removed. The suffix of a type created from a script will fall back to its script file name. For global types by scripts, if you customize their suffixes to an empty string, their suffixes will be removed.
|
||||
|
||||
\ **Note:** Trying to list the base type in the ``type_blocklist`` will hide all types derived from the base type from the create dialog.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -228,7 +228,7 @@ Multiplies each component of the :ref:`Color<class_Color>`, including the alpha,
|
||||
|
||||
::
|
||||
|
||||
print(1.5 * Color(0.5, 0.5, 0.5)) # Prints "(0.75, 0.75, 0.75, 1.5)"
|
||||
print(1.5 * Color(0.5, 0.5, 0.5)) # Prints (0.75, 0.75, 0.75, 1.5)
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -256,7 +256,7 @@ Multiplies each component of the :ref:`Vector2<class_Vector2>` by the given **fl
|
||||
|
||||
::
|
||||
|
||||
print(2.5 * Vector2(1, 3)) # Prints "(2.5, 7.5)"
|
||||
print(2.5 * Vector2(1, 3)) # Prints (2.5, 7.5)
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ The ``blend_shapes`` argument is an array of vertex data for each blend shape. E
|
||||
|
||||
The ``lods`` argument is a dictionary with :ref:`float<class_float>` keys and :ref:`PackedInt32Array<class_PackedInt32Array>` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used.
|
||||
|
||||
The ``flags`` argument is the bitwise or of, as required: One value of :ref:`ArrayCustomFormat<enum_Mesh_ArrayCustomFormat>` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE<class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE>`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS<class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS>`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY<class_Mesh_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY>`.
|
||||
The ``flags`` argument is the bitwise OR of, as required: One value of :ref:`ArrayCustomFormat<enum_Mesh_ArrayCustomFormat>` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE<class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE>`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS<class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS>`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY<class_Mesh_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY>`.
|
||||
|
||||
\ **Note:** When using indices, it is recommended to only use points, lines, or triangles.
|
||||
|
||||
|
||||
@@ -30,11 +30,13 @@ JavaScriptObject is used to interact with JavaScript objects retrieved or create
|
||||
|
||||
func _init():
|
||||
var buf = JavaScriptBridge.create_object("ArrayBuffer", 10) # new ArrayBuffer(10)
|
||||
print(buf) # prints [JavaScriptObject:OBJECT_ID]
|
||||
print(buf) # Prints [JavaScriptObject:OBJECT_ID]
|
||||
var uint8arr = JavaScriptBridge.create_object("Uint8Array", buf) # new Uint8Array(buf)
|
||||
uint8arr[1] = 255
|
||||
prints(uint8arr[1], uint8arr.byteLength) # prints 255 10
|
||||
console.log(uint8arr) # prints in browser console "Uint8Array(10) [ 0, 255, 0, 0, 0, 0, 0, 0, 0, 0 ]"
|
||||
prints(uint8arr[1], uint8arr.byteLength) # Prints "255 10"
|
||||
|
||||
# Prints "Uint8Array(10) [ 0, 255, 0, 0, 0, 0, 0, 0, 0, 0 ]" in the browser's console.
|
||||
console.log(uint8arr)
|
||||
|
||||
# Equivalent of JavaScriptBridge: Array.from(uint8arr).forEach(myCallback)
|
||||
JavaScriptBridge.get_interface("Array").from(uint8arr).forEach(_my_js_callback)
|
||||
|
||||
@@ -37,7 +37,7 @@ The **JSON** class enables all data types to be converted to and from a JSON str
|
||||
if error == OK:
|
||||
var data_received = json.data
|
||||
if typeof(data_received) == TYPE_ARRAY:
|
||||
print(data_received) # Prints array
|
||||
print(data_received) # Prints the array.
|
||||
else:
|
||||
print("Unexpected data")
|
||||
else:
|
||||
|
||||
@@ -26,7 +26,7 @@ Description
|
||||
|
||||
- When the **LineEdit** control is focused using the keyboard arrow keys, it will only gain focus and not enter edit mode.
|
||||
|
||||
- To enter edit mode, click on the control with the mouse or press the ``ui_text_submit`` action (by default :kbd:`Enter` or :kbd:`Kp Enter`).
|
||||
- To enter edit mode, click on the control with the mouse, see also :ref:`keep_editing_on_text_submit<class_LineEdit_property_keep_editing_on_text_submit>`.
|
||||
|
||||
- To exit edit mode, press ``ui_text_submit`` or ``ui_cancel`` (by default :kbd:`Escape`) actions.
|
||||
|
||||
@@ -121,6 +121,8 @@ Properties
|
||||
+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
|
||||
| :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
|
||||
+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`keep_editing_on_text_submit<class_LineEdit_property_keep_editing_on_text_submit>` | ``false`` |
|
||||
+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`language<class_LineEdit_property_language>` | ``""`` |
|
||||
+-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`max_length<class_LineEdit_property_max_length>` | ``0`` |
|
||||
@@ -901,6 +903,23 @@ If ``true``, the **LineEdit** doesn't display decoration.
|
||||
|
||||
----
|
||||
|
||||
.. _class_LineEdit_property_keep_editing_on_text_submit:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **keep_editing_on_text_submit** = ``false`` :ref:`🔗<class_LineEdit_property_keep_editing_on_text_submit>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_keep_editing_on_text_submit**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **is_editing_kept_on_text_submit**\ (\ )
|
||||
|
||||
If ``true``, the **LineEdit** will not exit edit mode when text is submitted by pressing ``ui_text_submit`` action (by default: :kbd:`Enter` or :kbd:`Kp Enter`).
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_LineEdit_property_language:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
@@ -1291,7 +1310,7 @@ Clears the current selection.
|
||||
|
||||
Allows entering edit mode whether the **LineEdit** is focused or not.
|
||||
|
||||
Use :ref:`Callable.call_deferred<class_Callable_method_call_deferred>` if you want to enter edit mode on :ref:`text_submitted<class_LineEdit_signal_text_submitted>`.
|
||||
See also :ref:`keep_editing_on_text_submit<class_LineEdit_property_keep_editing_on_text_submit>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -785,7 +785,7 @@ Returns global menu minimum width.
|
||||
|
||||
Returns global menu close callback.
|
||||
|
||||
b]Note:** This method is implemented only on macOS.
|
||||
\ **Note:** This method is implemented on macOS and Windows.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1309,7 +1309,7 @@ Registers callable to emit when the menu is about to show.
|
||||
|
||||
\ **Note:** The OS can simulate menu opening to track menu item changes and global shortcuts, in which case the corresponding close callback is not triggered. Use :ref:`is_opened<class_NativeMenu_method_is_opened>` to check if the menu is currently opened.
|
||||
|
||||
\ **Note:** This method is implemented only on macOS.
|
||||
\ **Note:** This method is implemented on macOS and Windows.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -798,7 +798,9 @@ Rotates the node so that the local forward axis (-Z, :ref:`Vector3.FORWARD<class
|
||||
|
||||
The local up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly.
|
||||
|
||||
The ``target`` position cannot be the same as the node's position, the ``up`` vector cannot be zero, and the direction from the node's position to the ``target`` vector cannot be parallel to the ``up`` vector.
|
||||
The ``target`` position cannot be the same as the node's position, the ``up`` vector cannot be zero.
|
||||
|
||||
The ``target`` and the ``up`` cannot be :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`, and shouldn't be colinear to avoid unintended rotation around local Z axis.
|
||||
|
||||
Operations take place in global space, which means that the node must be in the scene tree.
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ Returns a copy of this node path with a colon character (``:``) prefixed, transf
|
||||
|
||||
// propertyPath points to the "position" in the "x" axis of this node.
|
||||
NodePath propertyPath = nodePath.GetAsPropertyPath();
|
||||
GD.Print(propertyPath); // Prints ":position:x".
|
||||
GD.Print(propertyPath); // Prints ":position:x"
|
||||
|
||||
|
||||
|
||||
@@ -264,12 +264,12 @@ Returns all property subnames concatenated with a colon character (``:``) as a s
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var node_path = ^"Sprite2D:texture:resource_name"
|
||||
print(node_path.get_concatenated_subnames()) # Prints "texture:resource_name".
|
||||
print(node_path.get_concatenated_subnames()) # Prints "texture:resource_name"
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
var nodePath = new NodePath("Sprite2D:texture:resource_name");
|
||||
GD.Print(nodePath.GetConcatenatedSubnames()); // Prints "texture:resource_name".
|
||||
GD.Print(nodePath.GetConcatenatedSubnames()); // Prints "texture:resource_name"
|
||||
|
||||
|
||||
|
||||
@@ -291,16 +291,16 @@ Returns the node name indicated by ``idx``, starting from 0. If ``idx`` is out o
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var sprite_path = NodePath("../RigidBody2D/Sprite2D")
|
||||
print(sprite_path.get_name(0)) # Prints "..".
|
||||
print(sprite_path.get_name(1)) # Prints "RigidBody2D".
|
||||
print(sprite_path.get_name(2)) # Prints "Sprite".
|
||||
print(sprite_path.get_name(0)) # Prints ".."
|
||||
print(sprite_path.get_name(1)) # Prints "RigidBody2D"
|
||||
print(sprite_path.get_name(2)) # Prints "Sprite"
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
var spritePath = new NodePath("../RigidBody2D/Sprite2D");
|
||||
GD.Print(spritePath.GetName(0)); // Prints "..".
|
||||
GD.Print(spritePath.GetName(1)); // Prints "PathFollow2D".
|
||||
GD.Print(spritePath.GetName(2)); // Prints "Sprite".
|
||||
GD.Print(spritePath.GetName(0)); // Prints ".."
|
||||
GD.Print(spritePath.GetName(1)); // Prints "PathFollow2D"
|
||||
GD.Print(spritePath.GetName(2)); // Prints "Sprite"
|
||||
|
||||
|
||||
|
||||
@@ -336,14 +336,14 @@ Returns the property name indicated by ``idx``, starting from 0. If ``idx`` is o
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var path_to_name = NodePath("Sprite2D:texture:resource_name")
|
||||
print(path_to_name.get_subname(0)) # Prints "texture".
|
||||
print(path_to_name.get_subname(1)) # Prints "resource_name".
|
||||
print(path_to_name.get_subname(0)) # Prints "texture"
|
||||
print(path_to_name.get_subname(1)) # Prints "resource_name"
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
var pathToName = new NodePath("Sprite2D:texture:resource_name");
|
||||
GD.Print(pathToName.GetSubname(0)); // Prints "texture".
|
||||
GD.Print(pathToName.GetSubname(1)); // Prints "resource_name".
|
||||
GD.Print(pathToName.GetSubname(0)); // Prints "texture"
|
||||
GD.Print(pathToName.GetSubname(1)); // Prints "resource_name"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1717,9 +1717,17 @@ Reads a user input as a UTF-8 encoded string from the standard input. This opera
|
||||
|
||||
:ref:`bool<class_bool>` **request_permission**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OS_method_request_permission>`
|
||||
|
||||
Requests permission from the OS for the given ``name``. Returns ``true`` if the permission has been successfully granted.
|
||||
Requests permission from the OS for the given ``name``. Returns ``true`` if the permission has already been granted. See also :ref:`MainLoop.on_request_permissions_result<class_MainLoop_signal_on_request_permissions_result>`.
|
||||
|
||||
\ **Note:** This method is currently only implemented on Android, to specifically request permission for ``"RECORD_AUDIO"`` by ``AudioDriverOpenSL``.
|
||||
The ``name`` must be the full permission name. For example:
|
||||
|
||||
- ``OS.request_permission("android.permission.READ_EXTERNAL_STORAGE")``\
|
||||
|
||||
- ``OS.request_permission("android.permission.POST_NOTIFICATIONS")``\
|
||||
|
||||
\ **Note:** Permission must be checked during export.
|
||||
|
||||
\ **Note:** This method is only implemented on Android.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1731,7 +1739,9 @@ Requests permission from the OS for the given ``name``. Returns ``true`` if the
|
||||
|
||||
:ref:`bool<class_bool>` **request_permissions**\ (\ ) :ref:`🔗<class_OS_method_request_permissions>`
|
||||
|
||||
Requests *dangerous* permissions from the OS. Returns ``true`` if permissions have been successfully granted.
|
||||
Requests *dangerous* permissions from the OS. Returns ``true`` if permissions have already been granted. See also :ref:`MainLoop.on_request_permissions_result<class_MainLoop_signal_on_request_permissions_result>`.
|
||||
|
||||
\ **Note:** Permissions must be checked during export.
|
||||
|
||||
\ **Note:** This method is only implemented on Android. Normal permissions are automatically granted at install time in Android applications.
|
||||
|
||||
|
||||
@@ -789,12 +789,12 @@ Returns a hexadecimal representation of this array as a :ref:`String<class_Strin
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var array = PackedByteArray([11, 46, 255])
|
||||
print(array.hex_encode()) # Prints: 0b2eff
|
||||
print(array.hex_encode()) # Prints "0b2eff"
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
byte[] array = [11, 46, 255];
|
||||
GD.Print(array.HexEncode()); // Prints: 0b2eff
|
||||
GD.Print(array.HexEncode()); // Prints "0b2eff"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,11 +35,14 @@ You can retrieve the data by iterating on the container, which will work as if i
|
||||
var container = load("packed_data.res")
|
||||
for key in container:
|
||||
prints(key, container[key])
|
||||
|
||||
# Prints:
|
||||
# key value
|
||||
# lock (0, 0)
|
||||
# another_key 123
|
||||
|
||||
Prints:
|
||||
|
||||
.. code:: text
|
||||
|
||||
key value
|
||||
lock (0, 0)
|
||||
another_key 123
|
||||
|
||||
Nested containers will be packed recursively. While iterating, they will be returned as :ref:`PackedDataContainerRef<class_PackedDataContainerRef>`.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ When packing nested containers using :ref:`PackedDataContainer<class_PackedDataC
|
||||
::
|
||||
|
||||
var packed = PackedDataContainer.new()
|
||||
packed.pack([1, 2, 3, ["abc", "def"], 4, 5, 6])
|
||||
packed.pack([1, 2, 3, ["nested1", "nested2"], 4, 5, 6])
|
||||
|
||||
for element in packed:
|
||||
if element is PackedDataContainerRef:
|
||||
@@ -32,16 +32,19 @@ When packing nested containers using :ref:`PackedDataContainer<class_PackedDataC
|
||||
print("::", subelement)
|
||||
else:
|
||||
print(element)
|
||||
|
||||
# Prints:
|
||||
# 1
|
||||
# 2
|
||||
# 3
|
||||
# ::abc
|
||||
# ::def
|
||||
# 4
|
||||
# 5
|
||||
# 6
|
||||
|
||||
Prints:
|
||||
|
||||
.. code:: text
|
||||
|
||||
1
|
||||
2
|
||||
3
|
||||
::nested1
|
||||
::nested2
|
||||
4
|
||||
5
|
||||
6
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
|
||||
@@ -257,6 +257,23 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
.. _class_ParticleProcessMaterial_signal_emission_shape_changed:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**emission_shape_changed**\ (\ ) :ref:`🔗<class_ParticleProcessMaterial_signal_emission_shape_changed>`
|
||||
|
||||
Emitted when this material's emission shape is changed in any way. This includes changes to :ref:`emission_shape<class_ParticleProcessMaterial_property_emission_shape>`, :ref:`emission_shape_scale<class_ParticleProcessMaterial_property_emission_shape_scale>`, or :ref:`emission_sphere_radius<class_ParticleProcessMaterial_property_emission_sphere_radius>`, and any other property that affects the emission shape's offset, size, scale, or orientation.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ The current state of the random number generator. Save and restore this property
|
||||
var saved_state = rng.state # Store current state.
|
||||
print(rng.randf()) # Advance internal state.
|
||||
rng.state = saved_state # Restore the state.
|
||||
print(rng.randf()) # Prints the same value as in previous.
|
||||
print(rng.randf()) # Prints the same value as previously.
|
||||
|
||||
\ **Note:** Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use :ref:`seed<class_RandomNumberGenerator_property_seed>` instead.
|
||||
|
||||
|
||||
@@ -1634,11 +1634,7 @@ Flag used to mark an index array.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_BLEND_SHAPE_MASK** = ``7``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Mask of mesh channels permitted in blend shapes.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_BASE:
|
||||
|
||||
@@ -1646,11 +1642,7 @@ Flag used to mark an index array.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM_BASE** = ``13``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Shift of first custom channel.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_BITS:
|
||||
|
||||
@@ -1658,11 +1650,7 @@ Flag used to mark an index array.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM_BITS** = ``3``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Number of format bits per custom channel. See :ref:`ArrayCustomFormat<enum_RenderingServer_ArrayCustomFormat>`.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM0_SHIFT:
|
||||
|
||||
@@ -1670,11 +1658,7 @@ Flag used to mark an index array.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM0_SHIFT** = ``13``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Amount to shift :ref:`ArrayCustomFormat<enum_RenderingServer_ArrayCustomFormat>` for custom channel index 0.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM1_SHIFT:
|
||||
|
||||
@@ -1682,11 +1666,7 @@ Flag used to mark an index array.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM1_SHIFT** = ``16``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Amount to shift :ref:`ArrayCustomFormat<enum_RenderingServer_ArrayCustomFormat>` for custom channel index 1.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM2_SHIFT:
|
||||
|
||||
@@ -1694,11 +1674,7 @@ Flag used to mark an index array.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM2_SHIFT** = ``19``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Amount to shift :ref:`ArrayCustomFormat<enum_RenderingServer_ArrayCustomFormat>` for custom channel index 2.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM3_SHIFT:
|
||||
|
||||
@@ -1706,11 +1682,7 @@ Flag used to mark an index array.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM3_SHIFT** = ``22``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Amount to shift :ref:`ArrayCustomFormat<enum_RenderingServer_ArrayCustomFormat>` for custom channel index 3.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_MASK:
|
||||
|
||||
@@ -1718,11 +1690,7 @@ Flag used to mark an index array.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM_MASK** = ``7``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See :ref:`ArrayCustomFormat<enum_RenderingServer_ArrayCustomFormat>`.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_COMPRESS_FLAGS_BASE:
|
||||
|
||||
@@ -1730,11 +1698,7 @@ Flag used to mark an index array.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_COMPRESS_FLAGS_BASE** = ``25``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Shift of first compress flag. Compress flags should be passed to :ref:`ArrayMesh.add_surface_from_arrays<class_ArrayMesh_method_add_surface_from_arrays>` and :ref:`SurfaceTool.commit<class_SurfaceTool_method_commit>`.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_FLAG_USE_2D_VERTICES:
|
||||
|
||||
@@ -1750,11 +1714,7 @@ Flag used to mark that the array contains 2D vertices.
|
||||
|
||||
:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_USE_DYNAMIC_UPDATE** = ``67108864``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
|
||||
Flag indices that the mesh data will use ``GL_DYNAMIC_DRAW`` on GLES. Unused on Vulkan.
|
||||
|
||||
.. _class_RenderingServer_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS:
|
||||
|
||||
@@ -11759,16 +11719,14 @@ Copies the viewport to a region of the screen specified by ``rect``. If :ref:`vi
|
||||
|
||||
For example, you can set the root viewport to not render at all with the following code:
|
||||
|
||||
FIXME: The method seems to be non-existent.
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
func _ready():
|
||||
get_viewport().set_attach_to_screen_rect(Rect2())
|
||||
$Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))
|
||||
RenderingServer.viewport_attach_to_screen(get_viewport().get_viewport_rid(), Rect2())
|
||||
RenderingServer.viewport_attach_to_screen($Viewport.get_viewport_rid(), Rect2(0, 0, 600, 600))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -234,9 +234,9 @@ Returns the dependencies for the resource at the given ``path``.
|
||||
|
||||
::
|
||||
|
||||
for dep in ResourceLoader.get_dependencies(path):
|
||||
print(dep.get_slice("::", 0)) # Prints UID.
|
||||
print(dep.get_slice("::", 2)) # Prints path.
|
||||
for dependency in ResourceLoader.get_dependencies(path):
|
||||
print(dependency.get_slice("::", 0)) # Prints the UID.
|
||||
print(dependency.get_slice("::", 2)) # Prints the path.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -33,17 +33,82 @@ Properties
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------------+-----------------------------------------------------------------------------+-----------+
|
||||
| :ref:`bool<class_bool>` | :ref:`position_enabled<class_RetargetModifier3D_property_position_enabled>` | ``true`` |
|
||||
+-----------------------------------------------+-----------------------------------------------------------------------------+-----------+
|
||||
| :ref:`SkeletonProfile<class_SkeletonProfile>` | :ref:`profile<class_RetargetModifier3D_property_profile>` | |
|
||||
+-----------------------------------------------+-----------------------------------------------------------------------------+-----------+
|
||||
| :ref:`bool<class_bool>` | :ref:`rotation_enabled<class_RetargetModifier3D_property_rotation_enabled>` | ``true`` |
|
||||
+-----------------------------------------------+-----------------------------------------------------------------------------+-----------+
|
||||
| :ref:`bool<class_bool>` | :ref:`scale_enabled<class_RetargetModifier3D_property_scale_enabled>` | ``true`` |
|
||||
+-----------------------------------------------+-----------------------------------------------------------------------------+-----------+
|
||||
| :ref:`bool<class_bool>` | :ref:`use_global_pose<class_RetargetModifier3D_property_use_global_pose>` | ``false`` |
|
||||
+-----------------------------------------------+-----------------------------------------------------------------------------+-----------+
|
||||
+---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
|
||||
| |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\] | :ref:`enable<class_RetargetModifier3D_property_enable>` | ``7`` |
|
||||
+---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
|
||||
| :ref:`SkeletonProfile<class_SkeletonProfile>` | :ref:`profile<class_RetargetModifier3D_property_profile>` | |
|
||||
+---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
|
||||
| :ref:`bool<class_bool>` | :ref:`use_global_pose<class_RetargetModifier3D_property_use_global_pose>` | ``false`` |
|
||||
+---------------------------------------------------------------------------+---------------------------------------------------------------------------+-----------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_position_enabled<class_RetargetModifier3D_method_is_position_enabled>`\ (\ ) |const| |
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_rotation_enabled<class_RetargetModifier3D_method_is_rotation_enabled>`\ (\ ) |const| |
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_scale_enabled<class_RetargetModifier3D_method_is_scale_enabled>`\ (\ ) |const| |
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_position_enabled<class_RetargetModifier3D_method_set_position_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_rotation_enabled<class_RetargetModifier3D_method_set_rotation_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_scale_enabled<class_RetargetModifier3D_method_set_scale_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
|
||||
.. _enum_RetargetModifier3D_TransformFlag:
|
||||
|
||||
.. rst-class:: classref-enumeration
|
||||
|
||||
flags **TransformFlag**: :ref:`🔗<enum_RetargetModifier3D_TransformFlag>`
|
||||
|
||||
.. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_POSITION:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_POSITION** = ``1``
|
||||
|
||||
If set, allows to retarget the position.
|
||||
|
||||
.. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_ROTATION:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_ROTATION** = ``2``
|
||||
|
||||
If set, allows to retarget the rotation.
|
||||
|
||||
.. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_SCALE:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_SCALE** = ``4``
|
||||
|
||||
If set, allows to retarget the scale.
|
||||
|
||||
.. _class_RetargetModifier3D_constant_TRANSFORM_FLAG_ALL:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>` **TRANSFORM_FLAG_ALL** = ``7``
|
||||
|
||||
If set, allows to retarget the position/rotation/scale.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -54,18 +119,18 @@ Properties
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_RetargetModifier3D_property_position_enabled:
|
||||
.. _class_RetargetModifier3D_property_enable:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **position_enabled** = ``true`` :ref:`🔗<class_RetargetModifier3D_property_position_enabled>`
|
||||
|bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\] **enable** = ``7`` :ref:`🔗<class_RetargetModifier3D_property_enable>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_position_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **is_position_enabled**\ (\ )
|
||||
- |void| **set_enable_flags**\ (\ value\: |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\]\ )
|
||||
- |bitfield|\[:ref:`TransformFlag<enum_RetargetModifier3D_TransformFlag>`\] **get_enable_flags**\ (\ )
|
||||
|
||||
If ``true``, allows to retarget the position.
|
||||
Flags to control the process of the transform elements individually when :ref:`use_global_pose<class_RetargetModifier3D_property_use_global_pose>` is disabled.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -88,40 +153,6 @@ If ``true``, allows to retarget the position.
|
||||
|
||||
----
|
||||
|
||||
.. _class_RetargetModifier3D_property_rotation_enabled:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **rotation_enabled** = ``true`` :ref:`🔗<class_RetargetModifier3D_property_rotation_enabled>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_rotation_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **is_rotation_enabled**\ (\ )
|
||||
|
||||
If ``true``, allows to retarget the rotation.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RetargetModifier3D_property_scale_enabled:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **scale_enabled** = ``true`` :ref:`🔗<class_RetargetModifier3D_property_scale_enabled>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_scale_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **is_scale_enabled**\ (\ )
|
||||
|
||||
If ``true``, allows to retarget the scale.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RetargetModifier3D_property_use_global_pose:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
@@ -143,6 +174,83 @@ In case the target skeleton has fewer bones than the source skeleton, the source
|
||||
|
||||
This is useful for using dummy bone with length ``0`` to match postures when retargeting between models with different number of bones.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_RetargetModifier3D_method_is_position_enabled:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_position_enabled**\ (\ ) |const| :ref:`🔗<class_RetargetModifier3D_method_is_position_enabled>`
|
||||
|
||||
Returns ``true`` if :ref:`enable<class_RetargetModifier3D_property_enable>` has :ref:`TRANSFORM_FLAG_POSITION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_POSITION>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RetargetModifier3D_method_is_rotation_enabled:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_rotation_enabled**\ (\ ) |const| :ref:`🔗<class_RetargetModifier3D_method_is_rotation_enabled>`
|
||||
|
||||
Returns ``true`` if :ref:`enable<class_RetargetModifier3D_property_enable>` has :ref:`TRANSFORM_FLAG_ROTATION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_ROTATION>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RetargetModifier3D_method_is_scale_enabled:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_scale_enabled**\ (\ ) |const| :ref:`🔗<class_RetargetModifier3D_method_is_scale_enabled>`
|
||||
|
||||
Returns ``true`` if :ref:`enable<class_RetargetModifier3D_property_enable>` has :ref:`TRANSFORM_FLAG_SCALE<class_RetargetModifier3D_constant_TRANSFORM_FLAG_SCALE>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RetargetModifier3D_method_set_position_enabled:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_position_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RetargetModifier3D_method_set_position_enabled>`
|
||||
|
||||
Sets :ref:`TRANSFORM_FLAG_POSITION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_POSITION>` into :ref:`enable<class_RetargetModifier3D_property_enable>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RetargetModifier3D_method_set_rotation_enabled:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_rotation_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RetargetModifier3D_method_set_rotation_enabled>`
|
||||
|
||||
Sets :ref:`TRANSFORM_FLAG_ROTATION<class_RetargetModifier3D_constant_TRANSFORM_FLAG_ROTATION>` into :ref:`enable<class_RetargetModifier3D_property_enable>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RetargetModifier3D_method_set_scale_enabled:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_scale_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RetargetModifier3D_method_set_scale_enabled>`
|
||||
|
||||
Sets :ref:`TRANSFORM_FLAG_SCALE<class_RetargetModifier3D_constant_TRANSFORM_FLAG_SCALE>` into :ref:`enable<class_RetargetModifier3D_property_enable>`.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |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.)`
|
||||
|
||||
@@ -347,6 +347,8 @@ Signals
|
||||
|
||||
Triggered when the document is fully loaded.
|
||||
|
||||
\ **Note:** This can happen before the text is processed for drawing. Scrolling values may not be valid until the document is drawn for the first time after this signal.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
@@ -737,10 +737,10 @@ See also the :doc:`GDScript format string <../tutorials/scripting/gdscript/gdscr
|
||||
|
||||
::
|
||||
|
||||
print("{0} {1}".format(["{1}", "x"])) # Prints "x x".
|
||||
print("{0} {1}".format(["x", "{0}"])) # Prints "x {0}".
|
||||
print("{a} {b}".format({"a": "{b}", "b": "c"})) # Prints "c c".
|
||||
print("{a} {b}".format({"b": "c", "a": "{b}"})) # Prints "{b} c".
|
||||
print("{0} {1}".format(["{1}", "x"])) # Prints "x x"
|
||||
print("{0} {1}".format(["x", "{0}"])) # Prints "x {0}"
|
||||
print("{a} {b}".format({"a": "{b}", "b": "c"})) # Prints "c c"
|
||||
print("{a} {b}".format({"b": "c", "a": "{b}"})) # Prints "{b} c"
|
||||
|
||||
\ **Note:** In C#, it's recommended to `interpolate strings with "$" <https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated>`__, instead.
|
||||
|
||||
|
||||
@@ -691,10 +691,10 @@ See also the :doc:`GDScript format string <../tutorials/scripting/gdscript/gdscr
|
||||
|
||||
::
|
||||
|
||||
print("{0} {1}".format(["{1}", "x"])) # Prints "x x".
|
||||
print("{0} {1}".format(["x", "{0}"])) # Prints "x {0}".
|
||||
print("{a} {b}".format({"a": "{b}", "b": "c"})) # Prints "c c".
|
||||
print("{a} {b}".format({"b": "c", "a": "{b}"})) # Prints "{b} c".
|
||||
print("{0} {1}".format(["{1}", "x"])) # Prints "x x"
|
||||
print("{0} {1}".format(["x", "{0}"])) # Prints "x {0}"
|
||||
print("{a} {b}".format({"a": "{b}", "b": "c"})) # Prints "c c"
|
||||
print("{a} {b}".format({"b": "c", "a": "{b}"})) # Prints "{b} c"
|
||||
|
||||
\ **Note:** In C#, it's recommended to `interpolate strings with "$" <https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated>`__, instead.
|
||||
|
||||
|
||||
@@ -341,7 +341,7 @@ Clear all information passed into the surface tool so far.
|
||||
|
||||
Returns a constructed :ref:`ArrayMesh<class_ArrayMesh>` from current information passed in. If an existing :ref:`ArrayMesh<class_ArrayMesh>` is passed in as an argument, will add an extra surface to the existing :ref:`ArrayMesh<class_ArrayMesh>`.
|
||||
|
||||
\ **FIXME:** Document possible values for ``flags``, it changed in 4.0. Likely some combinations of :ref:`ArrayFormat<enum_Mesh_ArrayFormat>`.
|
||||
The ``flags`` argument can be the bitwise OR of :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE<class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE>`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS<class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS>`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY<class_Mesh_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -4232,9 +4232,12 @@ When ``chars_per_line`` is greater than zero, line break boundaries are returned
|
||||
::
|
||||
|
||||
var ts = TextServerManager.get_primary_interface()
|
||||
print(ts.string_get_word_breaks("The Godot Engine, 4")) # Prints [0, 3, 4, 9, 10, 16, 18, 19], which corresponds to the following substrings: "The", "Godot", "Engine", "4"
|
||||
print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 5)) # Prints [0, 3, 4, 9, 10, 15, 15, 19], which corresponds to the following substrings: "The", "Godot", "Engin", "e, 4"
|
||||
print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 10)) # Prints [0, 9, 10, 19], which corresponds to the following substrings: "The Godot", "Engine, 4"
|
||||
# Corresponds to the substrings "The", "Godot", "Engine", and "4".
|
||||
print(ts.string_get_word_breaks("The Godot Engine, 4")) # Prints [0, 3, 4, 9, 10, 16, 18, 19]
|
||||
# Corresponds to the substrings "The", "Godot", "Engin", and "e, 4".
|
||||
print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 5)) # Prints [0, 3, 4, 9, 10, 15, 15, 19]
|
||||
# Corresponds to the substrings "The Godot" and "Engine, 4".
|
||||
print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 10)) # Prints [0, 9, 10, 19]
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ If ``true``, the timer will start immediately when it enters the scene tree.
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_ignore_time_scale**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **get_ignore_time_scale**\ (\ )
|
||||
- :ref:`bool<class_bool>` **is_ignoring_time_scale**\ (\ )
|
||||
|
||||
If ``true``, the timer will ignore :ref:`Engine.time_scale<class_Engine_property_time_scale>` and update with the real, elapsed time.
|
||||
|
||||
|
||||
@@ -180,6 +180,8 @@ Methods
|
||||
+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Tween<class_Tween>` | :ref:`set_ease<class_Tween_method_set_ease>`\ (\ ease\: :ref:`EaseType<enum_Tween_EaseType>`\ ) |
|
||||
+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Tween<class_Tween>` | :ref:`set_ignore_time_scale<class_Tween_method_set_ignore_time_scale>`\ (\ ignore\: :ref:`bool<class_bool>` = true\ ) |
|
||||
+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Tween<class_Tween>` | :ref:`set_loops<class_Tween_method_set_loops>`\ (\ loops\: :ref:`int<class_int>` = 0\ ) |
|
||||
+-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Tween<class_Tween>` | :ref:`set_parallel<class_Tween_method_set_parallel>`\ (\ parallel\: :ref:`bool<class_bool>` = true\ ) |
|
||||
@@ -691,6 +693,18 @@ Before this method is called, the default ease type is :ref:`EASE_IN_OUT<class_T
|
||||
|
||||
----
|
||||
|
||||
.. _class_Tween_method_set_ignore_time_scale:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Tween<class_Tween>` **set_ignore_time_scale**\ (\ ignore\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_Tween_method_set_ignore_time_scale>`
|
||||
|
||||
If ``ignore`` is ``true``, the tween will ignore :ref:`Engine.time_scale<class_Engine_property_time_scale>` and update with the real, elapsed time. This affects all :ref:`Tweener<class_Tweener>`\ s and their delays. Default value is ``false``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Tween_method_set_loops:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -673,9 +673,9 @@ Creates a unit **Vector2** rotated to the given ``angle`` in radians. This is eq
|
||||
|
||||
::
|
||||
|
||||
print(Vector2.from_angle(0)) # Prints (1.0, 0.0).
|
||||
print(Vector2.from_angle(0)) # Prints (1.0, 0.0)
|
||||
print(Vector2(1, 0).angle()) # Prints 0.0, which is the angle used above.
|
||||
print(Vector2.from_angle(PI / 2)) # Prints (0.0, 1.0).
|
||||
print(Vector2.from_angle(PI / 2)) # Prints (0.0, 1.0)
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -901,7 +901,7 @@ Divides each component of the **Vector4** by the given :ref:`float<class_float>`
|
||||
|
||||
::
|
||||
|
||||
print(Vector4(10, 20, 30, 40) / 2 # Prints (5.0, 10.0, 15.0, 20.0)
|
||||
print(Vector4(10, 20, 30, 40) / 2) # Prints (5.0, 10.0, 15.0, 20.0)
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
@@ -569,7 +569,7 @@ Gets the remainder of each component of the **Vector4i** with the components of
|
||||
|
||||
::
|
||||
|
||||
print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints (3, -4, 3, 0)
|
||||
print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints (3, -4, 3, 0)
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -585,7 +585,7 @@ Gets the remainder of each component of the **Vector4i** with the given :ref:`in
|
||||
|
||||
::
|
||||
|
||||
print(Vector4i(10, -20, 30, -40) % 7) # Prints (3, -6, 2, -5)
|
||||
print(Vector4i(10, -20, 30, -40) % 7) # Prints (3, -6, 2, -5)
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -697,7 +697,7 @@ Returns a Vector4 value due to floating-point operations.
|
||||
|
||||
::
|
||||
|
||||
print(Vector4i(10, 20, 30, 40) / 2 # Prints (5.0, 10.0, 15.0, 20.0)
|
||||
print(Vector4i(10, 20, 30, 40) / 2) # Prints (5.0, 10.0, 15.0, 20.0)
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user