Skip to content

Commit

Permalink
doc: Sync classref with current source
Browse files Browse the repository at this point in the history
And fix various bogus bindings following previous PRs.
  • Loading branch information
akien-mga committed Feb 19, 2021
1 parent 04cb7e6 commit 0d1d719
Show file tree
Hide file tree
Showing 57 changed files with 737 additions and 470 deletions.
2 changes: 1 addition & 1 deletion core/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void _ResourceLoader::_bind_methods() {
ClassDB::bind_method(D_METHOD("load_threaded_get_status", "path", "progress"), &_ResourceLoader::load_threaded_get_status, DEFVAL(Array()));
ClassDB::bind_method(D_METHOD("load_threaded_get", "path"), &_ResourceLoader::load_threaded_get);

ClassDB::bind_method(D_METHOD("load", "path", "type_hint", "no_cache"), &_ResourceLoader::load, DEFVAL(""), DEFVAL(CACHE_MODE_REUSE));
ClassDB::bind_method(D_METHOD("load", "path", "type_hint", "cache_mode"), &_ResourceLoader::load, DEFVAL(""), DEFVAL(CACHE_MODE_REUSE));
ClassDB::bind_method(D_METHOD("get_recognized_extensions_for_type", "type"), &_ResourceLoader::get_recognized_extensions_for_type);
ClassDB::bind_method(D_METHOD("set_abort_on_missing_resources", "abort"), &_ResourceLoader::set_abort_on_missing_resources);
ClassDB::bind_method(D_METHOD("get_dependencies", "path"), &_ResourceLoader::get_dependencies);
Expand Down
10 changes: 5 additions & 5 deletions core/input/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ void Input::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_key_pressed", "keycode"), &Input::is_key_pressed);
ClassDB::bind_method(D_METHOD("is_mouse_button_pressed", "button"), &Input::is_mouse_button_pressed);
ClassDB::bind_method(D_METHOD("is_joy_button_pressed", "device", "button"), &Input::is_joy_button_pressed);
ClassDB::bind_method(D_METHOD("is_action_pressed", "action", "exact"), &Input::is_action_pressed, DEFVAL(false));
ClassDB::bind_method(D_METHOD("is_action_just_pressed", "action", "exact"), &Input::is_action_just_pressed, DEFVAL(false));
ClassDB::bind_method(D_METHOD("is_action_just_released", "action", "exact"), &Input::is_action_just_released, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_action_strength", "action", "exact"), &Input::get_action_strength, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_action_raw_strength", "action", "exact"), &Input::get_action_strength, DEFVAL(false));
ClassDB::bind_method(D_METHOD("is_action_pressed", "action", "exact_match"), &Input::is_action_pressed, DEFVAL(false));
ClassDB::bind_method(D_METHOD("is_action_just_pressed", "action", "exact_match"), &Input::is_action_just_pressed, DEFVAL(false));
ClassDB::bind_method(D_METHOD("is_action_just_released", "action", "exact_match"), &Input::is_action_just_released, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_action_strength", "action", "exact_match"), &Input::get_action_strength, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_action_raw_strength", "action", "exact_match"), &Input::get_action_strength, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_axis", "negative_action", "positive_action"), &Input::get_axis);
ClassDB::bind_method(D_METHOD("get_vector", "negative_x", "positive_x", "negative_y", "positive_y", "deadzone"), &Input::get_vector, DEFVAL(-1.0f));
ClassDB::bind_method(D_METHOD("add_joy_mapping", "mapping", "update_existing"), &Input::add_joy_mapping, DEFVAL(false));
Expand Down
4 changes: 4 additions & 0 deletions core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ void ResourceFormatLoader::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::STRING, "get_resource_type", PropertyInfo(Variant::STRING, "path")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("get_dependencies", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "add_types")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::INT, "rename_dependencies", PropertyInfo(Variant::STRING, "path"), PropertyInfo(Variant::STRING, "renames")));

BIND_ENUM_CONSTANT(CACHE_MODE_IGNORE);
BIND_ENUM_CONSTANT(CACHE_MODE_REUSE);
BIND_ENUM_CONSTANT(CACHE_MODE_REPLACE);
}

///////////////////////////////////
Expand Down
2 changes: 2 additions & 0 deletions core/io/resource_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class ResourceFormatLoader : public Reference {
virtual ~ResourceFormatLoader() {}
};

VARIANT_ENUM_CAST(ResourceFormatLoader::CacheMode)

typedef void (*ResourceLoadErrorNotify)(void *p_ud, const String &p_text);
typedef void (*DependencyErrorNotify)(void *p_ud, const String &p_loading, const String &p_which, const String &p_type);

Expand Down
2 changes: 1 addition & 1 deletion core/object/undo_redo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ void UndoRedo::_bind_methods() {

ClassDB::bind_method(D_METHOD("get_history_count"), &UndoRedo::get_history_count);
ClassDB::bind_method(D_METHOD("get_current_action"), &UndoRedo::get_current_action);
ClassDB::bind_method(D_METHOD("get_action_name"), &UndoRedo::get_action_name);
ClassDB::bind_method(D_METHOD("get_action_name", "id"), &UndoRedo::get_action_name);
ClassDB::bind_method(D_METHOD("clear_history", "increase_version"), &UndoRedo::clear_history, DEFVAL(true));

ClassDB::bind_method(D_METHOD("get_current_action_name"), &UndoRedo::get_current_action_name);
Expand Down
8 changes: 4 additions & 4 deletions doc/classes/AnimationPlayer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
<member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time" default="0.0">
The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision.
</member>
<member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode" default="1">
<member name="playback_process_mode" type="int" setter="set_process_callback" getter="get_process_callback" enum="AnimationPlayer.AnimationProcessCallback" default="1">
The process notification in which to update animations.
</member>
<member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
Expand Down Expand Up @@ -299,13 +299,13 @@
</signal>
</signals>
<constants>
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessCallback">
Process animation during the physics process. This is especially useful when animating physics bodies.
</constant>
<constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
<constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessCallback">
Process animation during the idle process.
</constant>
<constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
<constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessCallback">
Do not process animation. Use [method advance] to process the animation manually.
</constant>
<constant name="ANIMATION_METHOD_CALL_DEFERRED" value="0" enum="AnimationMethodCallMode">
Expand Down
9 changes: 4 additions & 5 deletions doc/classes/AnimationTree.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
<member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath(&quot;&quot;)">
The path to the [AnimationPlayer] used for animating.
</member>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1">
The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes.
<member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="AnimationTree.AnimationProcessCallback" default="1">
</member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
Expand All @@ -57,13 +56,13 @@
</member>
</members>
<constants>
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessCallback">
The animations will progress during the physics frame (i.e. [method Node._physics_process]).
</constant>
<constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
<constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessCallback">
The animations will progress during the idle frame (i.e. [method Node._process]).
</constant>
<constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
<constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessCallback">
The animations will only progress manually (see [method advance]).
</constant>
</constants>
Expand Down
6 changes: 3 additions & 3 deletions doc/classes/BakedLightmapData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
</return>
<argument index="0" name="path" type="NodePath">
</argument>
<argument index="1" name="lightmap" type="Rect2">
<argument index="1" name="uv_scale" type="Rect2">
</argument>
<argument index="2" name="offset" type="int">
<argument index="2" name="slice_index" type="int">
</argument>
<argument index="3" name="arg3" type="int">
<argument index="3" name="sub_instance" type="int">
</argument>
<description>
</description>
Expand Down
8 changes: 4 additions & 4 deletions doc/classes/Camera2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The camera's offset, useful for looking around or camera shake animations.
</member>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Camera2D.Camera2DProcessMode" default="1">
The camera's process callback. See [enum Camera2DProcessMode].
<member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1">
The camera's process callback. See [enum Camera2DProcessCallback].
</member>
<member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false">
If [code]true[/code], the camera rotates with the target.
Expand All @@ -191,10 +191,10 @@
<constant name="ANCHOR_MODE_DRAG_CENTER" value="1" enum="AnchorMode">
The camera's position takes into account vertical/horizontal offsets and the screen size.
</constant>
<constant name="CAMERA2D_PROCESS_PHYSICS" value="0" enum="Camera2DProcessMode">
<constant name="CAMERA2D_PROCESS_PHYSICS" value="0" enum="Camera2DProcessCallback">
The camera updates with the [code]_physics_process[/code] callback.
</constant>
<constant name="CAMERA2D_PROCESS_IDLE" value="1" enum="Camera2DProcessMode">
<constant name="CAMERA2D_PROCESS_IDLE" value="1" enum="Camera2DProcessCallback">
The camera updates with the [code]_process[/code] callback.
</constant>
</constants>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/CharFXTransform.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
The color the character will be drawn with.
</member>
<member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0">
The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].
The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused depending on the value of the [RichTextLabel]'s [member Node.process_mode].
[b]Note:[/b] Time still passes while the [RichTextLabel] is hidden.
</member>
<member name="env" type="Dictionary" setter="set_environment" getter="get_environment" default="{}">
Expand Down
8 changes: 4 additions & 4 deletions doc/classes/ClippedCamera3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
The camera's collision margin. The camera can't get closer than this distance to a colliding object.
</member>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera3D.ProcessMode" default="0">
The camera's process callback. See [enum ProcessMode].
<member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="ClippedCamera3D.ClipProcessCallback" default="0">
The camera's process callback. See [enum ClipProcessCallback].
</member>
</members>
<constants>
<constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ProcessMode">
<constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ClipProcessCallback">
The camera updates with the [code]_physics_process[/code] callback.
</constant>
<constant name="CLIP_PROCESS_IDLE" value="1" enum="ProcessMode">
<constant name="CLIP_PROCESS_IDLE" value="1" enum="ClipProcessCallback">
The camera updates with the [code]_process[/code] callback.
</constant>
</constants>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/DisplayServer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
</argument>
<argument index="3" name="subtitle_track" type="String">
</argument>
<argument index="4" name="arg4" type="int">
<argument index="4" name="screen" type="int">
</argument>
<description>
</description>
Expand Down
8 changes: 0 additions & 8 deletions doc/classes/EditorInspector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
<tutorials>
</tutorials>
<methods>
<method name="refresh">
<return type="void">
</return>
<description>
Refreshes the inspector.
[b]Note:[/b] To save on CPU resources, calling this method will do nothing if the time specified in [code]docks/property_editor/auto_refresh_interval[/code] editor setting hasn't passed yet since this method was last called. (By default, this interval is set to 0.3 seconds.)
</description>
</method>
</methods>
<members>
<member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false" />
Expand Down
4 changes: 4 additions & 0 deletions doc/classes/EditorPlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,10 @@
Emitted when user changes the workspace ([b]2D[/b], [b]3D[/b], [b]Script[/b], [b]AssetLib[/b]). Also works with custom screens defined by plugins.
</description>
</signal>
<signal name="project_settings_changed">
<description>
</description>
</signal>
<signal name="resource_saved">
<argument index="0" name="resource" type="Resource">
</argument>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/EditorSceneImporterMesh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</argument>
<argument index="4" name="material" type="Material" default="null">
</argument>
<argument index="5" name="arg5" type="String" default="&quot;&quot;">
<argument index="5" name="name" type="String" default="&quot;&quot;">
</argument>
<description>
</description>
Expand Down
10 changes: 10 additions & 0 deletions doc/classes/EditorSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@
Returns the default value of the setting specified by [code]name[/code]. This is the value that would be applied when clicking the Revert button in the Editor Settings.
</description>
</method>
<method name="set_builtin_action_override">
<return type="void">
</return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="actions_list" type="Array">
</argument>
<description>
</description>
</method>
<method name="set_favorites">
<return type="void">
</return>
Expand Down
6 changes: 3 additions & 3 deletions doc/classes/Environment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@
</member>
<member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0">
</member>
<member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.0">
</member>
<member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8">
</member>
<member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" enum="Environment.SDFGICascades" default="1">
Expand All @@ -187,8 +189,6 @@
</member>
<member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="false">
</member>
<member name="sdfgi_use_multi_bounce" type="bool" setter="set_sdfgi_use_multi_bounce" getter="is_sdfgi_using_multi_bounce" default="false">
</member>
<member name="sdfgi_use_occlusion" type="bool" setter="set_sdfgi_use_occlusion" getter="is_sdfgi_using_occlusion" default="false">
</member>
<member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="0">
Expand Down Expand Up @@ -272,7 +272,7 @@
</members>
<constants>
<constant name="BG_CLEAR_COLOR" value="0" enum="BGMode">
Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/default_clear_color].
Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/defaults/default_clear_color].
</constant>
<constant name="BG_COLOR" value="1" enum="BGMode">
Clears the background using a custom clear color.
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/GIProbe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</brief_description>
<description>
[GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/gi_probes/quality].
Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/gi_probes/quality].
</description>
<tutorials>
<link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/GLTFSkeleton.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<method name="get_bone_attachment">
<return type="BoneAttachment3D">
</return>
<argument index="0" name="arg0" type="int">
<argument index="0" name="idx" type="int">
</argument>
<description>
</description>
Expand Down
6 changes: 3 additions & 3 deletions doc/classes/GLTFState.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
<method name="get_animation_player">
<return type="AnimationPlayer">
</return>
<argument index="0" name="arg0" type="int">
<argument index="0" name="idx" type="int">
</argument>
<description>
</description>
</method>
<method name="get_animation_players_count">
<return type="int">
</return>
<argument index="0" name="arg0" type="int">
<argument index="0" name="idx" type="int">
</argument>
<description>
</description>
Expand Down Expand Up @@ -80,7 +80,7 @@
<method name="get_scene_node">
<return type="Node">
</return>
<argument index="0" name="arg0" type="int">
<argument index="0" name="idx" type="int">
</argument>
<description>
</description>
Expand Down
14 changes: 7 additions & 7 deletions doc/classes/GraphNode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,6 @@
Emitted when the GraphNode is moved.
</description>
</signal>
<signal name="slot_updated">
<argument index="0" name="idx" type="int">
</argument>
<description>
Emitted when any GraphNode's slot is updated.
</description>
</signal>
<signal name="raise_request">
<description>
Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
Expand All @@ -279,6 +272,13 @@
Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]).
</description>
</signal>
<signal name="slot_updated">
<argument index="0" name="idx" type="int">
</argument>
<description>
Emitted when any GraphNode's slot is updated.
</description>
</signal>
</signals>
<constants>
<constant name="OVERLAY_DISABLED" value="0" enum="Overlay">
Expand Down
12 changes: 12 additions & 0 deletions doc/classes/Image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
<link title="Importing images">https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html</link>
</tutorials>
<methods>
<method name="adjust_bcs">
<return type="void">
</return>
<argument index="0" name="brightness" type="float">
</argument>
<argument index="1" name="contrast" type="float">
</argument>
<argument index="2" name="saturation" type="float">
</argument>
<description>
</description>
</method>
<method name="blend_rect">
<return type="void">
</return>
Expand Down
Loading

0 comments on commit 0d1d719

Please sign in to comment.