From 9c9e3a391e5e9679f02e6e10092e33f126d9629e Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Wed, 14 Aug 2024 17:33:52 +0000 Subject: [PATCH] classref: Sync with current master branch (8e666ad) --- classes/class_animationmixer.rst | 9 ++++++++- classes/class_compositoreffect.rst | 2 +- classes/class_editorimportplugin.rst | 8 ++++---- classes/class_object.rst | 2 +- classes/class_skeletonmodifier3d.rst | 7 +++++++ classes/class_visibleonscreennotifier2d.rst | 2 +- classes/class_visibleonscreennotifier3d.rst | 2 +- 7 files changed, 23 insertions(+), 9 deletions(-) diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index 42d15af41..d970b77d9 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -25,6 +25,13 @@ Base class for :ref:`AnimationPlayer` and :ref:`Animation After instantiating the playback information data within the extended class, the blending is processed by the **AnimationMixer**. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Migrating Animations from Godot 4.0 to 4.3 `__ + .. rst-class:: classref-reftable-group Properties @@ -665,7 +672,7 @@ The most basic example is applying position to :ref:`CharacterBody3D`, you can apply the root motion position more correctly to account for the rotation of the node. +By using this in combination with :ref:`get_root_motion_rotation_accumulator`, you can apply the root motion position more correctly to account for the rotation of the node. .. tabs:: diff --git a/classes/class_compositoreffect.rst b/classes/class_compositoreffect.rst index fc44b8477..9c644ec5d 100644 --- a/classes/class_compositoreffect.rst +++ b/classes/class_compositoreffect.rst @@ -21,7 +21,7 @@ This resource allows for creating a custom rendering effect. Description ----------- -This resource defines a custom rendering effect that can be applied to :ref:`Viewport`\ s through the viewports' :ref:`Environment`. You can implement a callback that is called during rendering at a given stage of the rendering pipeline and allows you to insert additional passes. Note that this callback happens on the rendering thread. +This resource defines a custom rendering effect that can be applied to :ref:`Viewport`\ s through the viewports' :ref:`Environment`. You can implement a callback that is called during rendering at a given stage of the rendering pipeline and allows you to insert additional passes. Note that this callback happens on the rendering thread. CompositorEffect is an abstract base class and must be extended to implement specific rendering logic. .. rst-class:: classref-reftable-group diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index cdebc6083..eea95e10a 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -120,18 +120,18 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr }; } - public override int _Import(string sourceFile, string savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles) + public override Error _Import(string sourceFile, string savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles) { using var file = FileAccess.Open(sourceFile, FileAccess.ModeFlags.Read); if (file.GetError() != Error.Ok) { - return (int)Error.Failed; + return Error.Failed; } var mesh = new ArrayMesh(); // Fill the Mesh with data read in "file", left as an exercise to the reader. string filename = $"{savePath}.{_GetSaveExtension()}"; - return (int)ResourceSaver.Save(mesh, filename); + return ResourceSaver.Save(mesh, filename); } } @@ -388,7 +388,7 @@ This method must be overridden to do the actual importing work. See this class' :ref:`Error` **append_import_external_resource**\ (\ path\: :ref:`String`, custom_options\: :ref:`Dictionary` = {}, custom_importer\: :ref:`String` = "", generator_parameters\: :ref:`Variant` = null\ ) :ref:`🔗` -This function can only be called during the :ref:`_import` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. +This function can only be called during the :ref:`_import` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. .. |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.)` diff --git a/classes/class_object.rst b/classes/class_object.rst index 4910f84f5..9916ba561 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -695,7 +695,7 @@ Override this method to customize existing properties. Every property info goes public override void _ValidateProperty(Godot.Collections.Dictionary property) { - if (property["name"].AsStringName() == PropertyName.Number && IsNumberEditable) + if (property["name"].AsStringName() == PropertyName.Number && !IsNumberEditable) { var usage = property["usage"].As() | PropertyUsageFlags.ReadOnly; property["usage"] = (int)usage; diff --git a/classes/class_skeletonmodifier3d.rst b/classes/class_skeletonmodifier3d.rst index c61f42692..c00c09b43 100644 --- a/classes/class_skeletonmodifier3d.rst +++ b/classes/class_skeletonmodifier3d.rst @@ -27,6 +27,13 @@ If there is :ref:`AnimationMixer`, modification always per This node should be used to implement custom IK solvers, constraints, or skeleton physics. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Design of the Skeleton Modifier 3D `__ + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_visibleonscreennotifier2d.rst b/classes/class_visibleonscreennotifier2d.rst index 37e3e0554..b789caf23 100644 --- a/classes/class_visibleonscreennotifier2d.rst +++ b/classes/class_visibleonscreennotifier2d.rst @@ -21,7 +21,7 @@ A rectangular region of 2D space that detects whether it is visible on screen. Description ----------- -:ref:`VisibleOnScreenEnabler2D` represents a rectangular region of 2D space. When any part of this region becomes visible on screen or in a viewport, it will emit a :ref:`screen_entered` signal, and likewise it will emit a :ref:`screen_exited` signal when no part of it remains visible. +**VisibleOnScreenNotifier2D** represents a rectangular region of 2D space. When any part of this region becomes visible on screen or in a viewport, it will emit a :ref:`screen_entered` signal, and likewise it will emit a :ref:`screen_exited` signal when no part of it remains visible. If you want a node to be enabled automatically when this region is visible on screen, use :ref:`VisibleOnScreenEnabler2D`. diff --git a/classes/class_visibleonscreennotifier3d.rst b/classes/class_visibleonscreennotifier3d.rst index d201ffa61..ded7a0e14 100644 --- a/classes/class_visibleonscreennotifier3d.rst +++ b/classes/class_visibleonscreennotifier3d.rst @@ -21,7 +21,7 @@ A box-shaped region of 3D space that detects whether it is visible on screen. Description ----------- -:ref:`VisibleOnScreenEnabler3D` represents a box-shaped region of 3D space. When any part of this region becomes visible on screen or in a :ref:`Camera3D`'s view, it will emit a :ref:`screen_entered` signal, and likewise it will emit a :ref:`screen_exited` signal when no part of it remains visible. +**VisibleOnScreenNotifier3D** represents a box-shaped region of 3D space. When any part of this region becomes visible on screen or in a :ref:`Camera3D`'s view, it will emit a :ref:`screen_entered` signal, and likewise it will emit a :ref:`screen_exited` signal when no part of it remains visible. If you want a node to be enabled automatically when this region is visible on screen, use :ref:`VisibleOnScreenEnabler3D`.