summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AnimatedSprite3D.xml6
-rw-r--r--doc/classes/EditorPlugin.xml39
-rw-r--r--doc/classes/ProjectSettings.xml12
-rw-r--r--doc/classes/Tween.xml9
4 files changed, 50 insertions, 16 deletions
diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index 0bc5484e3a..58d3ca6ad3 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -13,8 +13,9 @@
<method name="play">
<return type="void" />
<param index="0" name="anim" type="StringName" default="&amp;&quot;&quot;" />
+ <param index="1" name="backwards" type="bool" default="false" />
<description>
- Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played.
+ Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played. If [param backwards] is [code]true[/code], the animation will be played in reverse.
</description>
</method>
<method name="stop">
@@ -37,6 +38,9 @@
<member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false">
If [code]true[/code], the [member animation] is currently playing.
</member>
+ <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
+ The animation speed is multiplied by this value.
+ </member>
</members>
<signals>
<signal name="animation_finished">
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 3c0d3ec6be..8f4c848041 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -64,8 +64,8 @@
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
- return true
- return false
+ return EditorPlugin.AFTER_GUI_INPUT_STOP
+ return EditorPlugin.AFTER_GUI_INPUT_PASS
[/gdscript]
[csharp]
public override void _Forward3dDrawOverViewport(Godot.Control overlay)
@@ -74,15 +74,15 @@
overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White);
}
- public override bool _Forward3dGuiInput(Godot.Camera3D camera, InputEvent @event)
+ public override EditorPlugin.AfterGUIInput _Forward3dGuiInput(Godot.Camera3D camera, InputEvent @event)
{
if (@event is InputEventMouseMotion)
{
// Redraw viewport when cursor is moved.
UpdateOverlays();
- return true;
+ return EditorPlugin.AFTER_GUI_INPUT_STOP;
}
- return false;
+ return EditorPlugin.AFTER_GUI_INPUT_PASS;
[/csharp]
[/codeblocks]
</description>
@@ -100,33 +100,33 @@
<param index="0" name="viewport_camera" type="Camera3D" />
<param index="1" name="event" type="InputEvent" />
<description>
- Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes. Example:
+ Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 3D viewport. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options. Example:
[codeblocks]
[gdscript]
- # Prevents the InputEvent to reach other Editor classes.
+ # Prevents the InputEvent from reaching other Editor classes.
func _forward_3d_gui_input(camera, event):
return EditorPlugin.AFTER_GUI_INPUT_STOP
[/gdscript]
[csharp]
- // Prevents the InputEvent to reach other Editor classes.
- public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
+ // Prevents the InputEvent from reaching other Editor classes.
+ public override EditorPlugin.AfterGUIInput _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
return EditorPlugin.AFTER_GUI_INPUT_STOP;
}
[/csharp]
[/codeblocks]
- Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes. Example:
+ Must [code]return EditorPlugin.AFTER_GUI_INPUT_PASS[/code] in order to forward the [InputEvent] to other Editor classes. Example:
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
func _forward_3d_gui_input(camera, event):
- return event is InputEventMouseMotion
+ return EditorPlugin.AFTER_GUI_INPUT_STOP if event is InputEventMouseMotion else EditorPlugin.AFTER_GUI_INPUT_PASS
[/gdscript]
[csharp]
// Consumes InputEventMouseMotion and forwards other InputEvent types.
- public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event)
+ public override EditorPlugin.AfterGUIInput _Forward3dGuiInput(Camera3D camera, InputEvent @event)
{
- return @event is InputEventMouseMotion;
+ return @event is InputEventMouseMotion ? EditorPlugin.AFTER_GUI_INPUT_STOP : EditorPlugin.AFTER_GUI_INPUT_PASS;
}
[/csharp]
[/codeblocks]
@@ -185,12 +185,12 @@
Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes. Example:
[codeblocks]
[gdscript]
- # Prevents the InputEvent to reach other Editor classes.
+ # Prevents the InputEvent from reaching other Editor classes.
func _forward_canvas_gui_input(event):
return true
[/gdscript]
[csharp]
- // Prevents the InputEvent to reach other Editor classes.
+ // Prevents the InputEvent from reaching other Editor classes.
public override bool ForwardCanvasGuiInput(InputEvent @event)
{
return true;
@@ -755,5 +755,14 @@
<constant name="DOCK_SLOT_MAX" value="8" enum="DockSlot">
Represents the size of the [enum DockSlot] enum.
</constant>
+ <constant name="AFTER_GUI_INPUT_PASS" value="0" enum="AfterGUIInput">
+ Forwards the [InputEvent] to other EditorPlugins.
+ </constant>
+ <constant name="AFTER_GUI_INPUT_STOP" value="1" enum="AfterGUIInput">
+ Prevents the [InputEvent] from reaching other Editor classes.
+ </constant>
+ <constant name="AFTER_GUI_INPUT_CUSTOM" value="2" enum="AfterGUIInput">
+ Pass the [InputEvent] to other editor plugins except the main [Node3D] one. This can be used to prevent node selection changes and work with sub-gizmos instead.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 3dbf7c75e5..1f07a13c94 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -640,10 +640,22 @@
If [code]true[/code], Blender 3D scene files with the [code].blend[/code] extension will be imported by converting them to glTF 2.0.
This requires configuring a path to a Blender executable in the editor settings at [code]filesystem/import/blender/blender3_path[/code]. Blender 3.0 or later is required.
</member>
+ <member name="filesystem/import/blender/enabled.android" type="bool" setter="" getter="" default="false">
+ Override for [member filesystem/import/blender/enabled] on Android where Blender can't easily be accessed from Godot.
+ </member>
+ <member name="filesystem/import/blender/enabled.web" type="bool" setter="" getter="" default="false">
+ Override for [member filesystem/import/blender/enabled] on the Web where Blender can't easily be accessed from Godot.
+ </member>
<member name="filesystem/import/fbx/enabled" type="bool" setter="" getter="" default="true">
If [code]true[/code], Autodesk FBX 3D scene files with the [code].fbx[/code] extension will be imported by converting them to glTF 2.0.
This requires configuring a path to a FBX2glTF executable in the editor settings at [code]filesystem/import/fbx/fbx2gltf_path[/code].
</member>
+ <member name="filesystem/import/fbx/enabled.android" type="bool" setter="" getter="" default="false">
+ Override for [member filesystem/import/fbx/enabled] on Android where FBX2glTF can't easily be accessed from Godot.
+ </member>
+ <member name="filesystem/import/fbx/enabled.web" type="bool" setter="" getter="" default="false">
+ Override for [member filesystem/import/fbx/enabled] on the Web where FBX2glTF can't easily be accessed from Godot.
+ </member>
<member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0">
Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden.
</member>
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index c7fc78c1d3..5186972477 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -36,9 +36,18 @@
tween.tween_property(sprite, "position", Vector2(0, 0), 1)
[/codeblock]
In the example above, all children of a node are moved one after another to position (0, 0).
+ You should avoid using more than one [Tween] per object's property. If two or more tweens animate one property at the same time, the last one created will take priority and assign the final value. If you want to interrupt and restart an animation, consider assigning the [Tween] to a variable:
+ [codeblock]
+ var tween
+ func animate():
+ if tween:
+ tween.kill() # Abort the previous animation.
+ tween = create_tween()
+ [/codeblock]
Some [Tweener]s use transitions and eases. The first accepts a [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]
[b]Note:[/b] All [Tween]s will automatically start by default. To prevent a [Tween] from autostarting, you can call [method stop] immediately after it is created.
+ [b]Note:[/b] [Tween]s are processing after all of nodes in the current frame, i.e. after [method Node._process] or [method Node._physics_process] (depending on [enum TweenProcessMode]).
</description>
<tutorials>
</tutorials>