From e5270c0db22248bd318a77681a7f4e06baf26a8d Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 13 Nov 2023 14:37:27 +0100 Subject: [PATCH] Link to runtime loading/saving tutorial and improve Image documentation --- doc/classes/AudioStreamWAV.xml | 1 + doc/classes/FileAccess.xml | 1 + doc/classes/FontFile.xml | 1 + doc/classes/Image.xml | 21 ++++++++++++------- doc/classes/VideoStream.xml | 1 + modules/gltf/doc_classes/GLTFAccessor.xml | 1 + modules/gltf/doc_classes/GLTFAnimation.xml | 1 + modules/gltf/doc_classes/GLTFBufferView.xml | 1 + modules/gltf/doc_classes/GLTFCamera.xml | 1 + modules/gltf/doc_classes/GLTFDocument.xml | 1 + .../doc_classes/GLTFDocumentExtension.xml | 1 + ...TFDocumentExtensionConvertImporterMesh.xml | 1 + modules/gltf/doc_classes/GLTFLight.xml | 1 + modules/gltf/doc_classes/GLTFMesh.xml | 1 + modules/gltf/doc_classes/GLTFNode.xml | 1 + modules/gltf/doc_classes/GLTFPhysicsBody.xml | 1 + modules/gltf/doc_classes/GLTFPhysicsShape.xml | 1 + modules/gltf/doc_classes/GLTFSkeleton.xml | 1 + modules/gltf/doc_classes/GLTFSkin.xml | 1 + modules/gltf/doc_classes/GLTFSpecGloss.xml | 1 + modules/gltf/doc_classes/GLTFState.xml | 1 + modules/gltf/doc_classes/GLTFTexture.xml | 1 + .../gltf/doc_classes/GLTFTextureSampler.xml | 1 + .../doc_classes/AudioStreamOggVorbis.xml | 1 + 24 files changed, 37 insertions(+), 7 deletions(-) diff --git a/doc/classes/AudioStreamWAV.xml b/doc/classes/AudioStreamWAV.xml index c3df946b4bd..206b6361cc6 100644 --- a/doc/classes/AudioStreamWAV.xml +++ b/doc/classes/AudioStreamWAV.xml @@ -8,6 +8,7 @@ This class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml index d1b20a3890e..df8ebc12fa8 100644 --- a/doc/classes/FileAccess.xml +++ b/doc/classes/FileAccess.xml @@ -39,6 +39,7 @@ $DOCS_URL/tutorials/scripting/filesystem.html + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html https://godotengine.org/asset-library/asset/676 diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml index 53d367817d4..87d647486c4 100644 --- a/doc/classes/FontFile.xml +++ b/doc/classes/FontFile.xml @@ -28,6 +28,7 @@ [/codeblocks] + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 310dae6c653..5677999d5dc 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -10,6 +10,7 @@ $DOCS_URL/tutorials/assets_pipeline/importing_images.html + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html @@ -201,8 +202,8 @@ - Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is [code]0[/code]. Enabling [param renormalize] when generating mipmaps for normal textures will make sure all resulting vector values are normalized. - It is possible to check if the image has mipmaps by calling [method has_mipmaps] or [method get_mipmap_count]. + Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is [code]0[/code]. Enabling [param renormalize] when generating mipmaps for normal map textures will make sure all resulting vector values are normalized. + It is possible to check if the image has mipmaps by calling [method has_mipmaps] or [method get_mipmap_count]. Calling [method generate_mipmaps] on an image that already has mipmaps will replace existing mipmaps in the image. @@ -317,6 +318,7 @@ Loads an image from the binary contents of a BMP file. [b]Note:[/b] Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported. + [b]Note:[/b] This method is only available in engine builds with the BMP module enabled. By default, the BMP module is enabled, but it can be disabled at build-time using the [code]module_bmp_enabled=no[/code] SCons option. @@ -337,7 +339,9 @@ - Loads an image from the binary contents of a KTX file. + Loads an image from the binary contents of a [url=https://github.com/KhronosGroup/KTX-Software]KTX[/url] file. Unlike most image formats, KTX can store VRAM-compressed data and embed mipmaps. + [b]Note:[/b] Godot's libktx implementation only supports 2D images. Cubemaps, texture arrays, and de-padding are not supported. + [b]Note:[/b] This method is only available in engine builds with the KTX module enabled. By default, the KTX module is enabled, but it can be disabled at build-time using the [code]module_ktx_enabled=no[/code] SCons option. @@ -371,6 +375,7 @@ Loads an image from the binary contents of a TGA file. + [b]Note:[/b] This method is only available in engine builds with the TGA module enabled. By default, the TGA module is enabled, but it can be disabled at build-time using the [code]module_tga_enabled=no[/code] SCons option. @@ -389,7 +394,7 @@ - Multiplies color values with alpha values. Resulting color values for a pixel are [code](color * alpha)/256[/code]. + Multiplies color values with alpha values. Resulting color values for a pixel are [code](color * alpha)/256[/code]. See also [member CanvasItemMaterial.blend_mode]. @@ -481,7 +486,8 @@ - Saves the image as a WebP (Web Picture) file to the file at [param path]. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). + Saves the image as a WebP (Web Picture) file to the file at [param path]. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. + [b]Note:[/b] The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images. @@ -489,7 +495,8 @@ - Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). + Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. + [b]Note:[/b] The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images. @@ -559,7 +566,7 @@ - Shrinks the image by a factor of 2. + Shrinks the image by a factor of 2 on each axis (this divides the pixel count by 4). diff --git a/doc/classes/VideoStream.xml b/doc/classes/VideoStream.xml index aa4c91bac22..271330a5986 100644 --- a/doc/classes/VideoStream.xml +++ b/doc/classes/VideoStream.xml @@ -8,6 +8,7 @@ $DOCS_URL/tutorials/animation/playing_videos.html + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFAccessor.xml b/modules/gltf/doc_classes/GLTFAccessor.xml index 8e4a72e6ae5..f678a11319e 100644 --- a/modules/gltf/doc_classes/GLTFAccessor.xml +++ b/modules/gltf/doc_classes/GLTFAccessor.xml @@ -5,6 +5,7 @@ + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFAnimation.xml b/modules/gltf/doc_classes/GLTFAnimation.xml index c1fe85c1c0a..65335250aab 100644 --- a/modules/gltf/doc_classes/GLTFAnimation.xml +++ b/modules/gltf/doc_classes/GLTFAnimation.xml @@ -5,6 +5,7 @@ + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFBufferView.xml b/modules/gltf/doc_classes/GLTFBufferView.xml index ce19650b5b9..d0f76a9af31 100644 --- a/modules/gltf/doc_classes/GLTFBufferView.xml +++ b/modules/gltf/doc_classes/GLTFBufferView.xml @@ -5,6 +5,7 @@ + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFCamera.xml b/modules/gltf/doc_classes/GLTFCamera.xml index c2ed4d08e3a..b334bf28676 100644 --- a/modules/gltf/doc_classes/GLTFCamera.xml +++ b/modules/gltf/doc_classes/GLTFCamera.xml @@ -7,6 +7,7 @@ Represents a camera as defined by the base GLTF spec. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-camera https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_015_SimpleCameras.md diff --git a/modules/gltf/doc_classes/GLTFDocument.xml b/modules/gltf/doc_classes/GLTFDocument.xml index 5c10b76e0ab..f5066ba4f1c 100644 --- a/modules/gltf/doc_classes/GLTFDocument.xml +++ b/modules/gltf/doc_classes/GLTFDocument.xml @@ -9,6 +9,7 @@ GLTFDocument can be extended with arbitrary functionality by extending the [GLTFDocumentExtension] class and registering it with GLTFDocument via [method register_gltf_document_extension]. This allows for custom data to be imported and exported. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html https://www.khronos.org/files/gltf20-reference-guide.pdf https://registry.khronos.org/glTF/ diff --git a/modules/gltf/doc_classes/GLTFDocumentExtension.xml b/modules/gltf/doc_classes/GLTFDocumentExtension.xml index eee62845ca5..aaa55e772a1 100644 --- a/modules/gltf/doc_classes/GLTFDocumentExtension.xml +++ b/modules/gltf/doc_classes/GLTFDocumentExtension.xml @@ -9,6 +9,7 @@ [b]Note:[/b] Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the [code]set_additional_data[/code] and [code]get_additional_data[/code] methods in [GLTFState] or [GLTFNode]. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFDocumentExtensionConvertImporterMesh.xml b/modules/gltf/doc_classes/GLTFDocumentExtensionConvertImporterMesh.xml index 3ca0359311f..04075caba5b 100644 --- a/modules/gltf/doc_classes/GLTFDocumentExtensionConvertImporterMesh.xml +++ b/modules/gltf/doc_classes/GLTFDocumentExtensionConvertImporterMesh.xml @@ -5,5 +5,6 @@ + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFLight.xml b/modules/gltf/doc_classes/GLTFLight.xml index c55962eeaa0..653a394ebb6 100644 --- a/modules/gltf/doc_classes/GLTFLight.xml +++ b/modules/gltf/doc_classes/GLTFLight.xml @@ -7,6 +7,7 @@ Represents a light as defined by the [code]KHR_lights_punctual[/code] GLTF extension. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual diff --git a/modules/gltf/doc_classes/GLTFMesh.xml b/modules/gltf/doc_classes/GLTFMesh.xml index df4d436f5cf..da05474ab9c 100644 --- a/modules/gltf/doc_classes/GLTFMesh.xml +++ b/modules/gltf/doc_classes/GLTFMesh.xml @@ -5,6 +5,7 @@ + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFNode.xml b/modules/gltf/doc_classes/GLTFNode.xml index 2ec39801f30..184ced43123 100644 --- a/modules/gltf/doc_classes/GLTFNode.xml +++ b/modules/gltf/doc_classes/GLTFNode.xml @@ -8,6 +8,7 @@ GLTF nodes generally exist inside of [GLTFState] which represents all data of a GLTF file. Most of GLTFNode's properties are indices of other data in the GLTF file. You can extend a GLTF node with additional properties by using [method get_additional_data] and [method set_additional_data]. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_004_ScenesNodes.md" diff --git a/modules/gltf/doc_classes/GLTFPhysicsBody.xml b/modules/gltf/doc_classes/GLTFPhysicsBody.xml index d364069193d..cf39721ce8f 100644 --- a/modules/gltf/doc_classes/GLTFPhysicsBody.xml +++ b/modules/gltf/doc_classes/GLTFPhysicsBody.xml @@ -7,6 +7,7 @@ Represents a physics body as defined by the [code]OMI_physics_body[/code] GLTF extension. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_body diff --git a/modules/gltf/doc_classes/GLTFPhysicsShape.xml b/modules/gltf/doc_classes/GLTFPhysicsShape.xml index 2891fab115d..67382f32957 100644 --- a/modules/gltf/doc_classes/GLTFPhysicsShape.xml +++ b/modules/gltf/doc_classes/GLTFPhysicsShape.xml @@ -7,6 +7,7 @@ Represents a physics shape as defined by the [code]OMI_collider[/code] GLTF extension. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_collider diff --git a/modules/gltf/doc_classes/GLTFSkeleton.xml b/modules/gltf/doc_classes/GLTFSkeleton.xml index c7b8cb2ac38..ac03a6ee9eb 100644 --- a/modules/gltf/doc_classes/GLTFSkeleton.xml +++ b/modules/gltf/doc_classes/GLTFSkeleton.xml @@ -5,6 +5,7 @@ + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFSkin.xml b/modules/gltf/doc_classes/GLTFSkin.xml index 98436ea2e7b..0835a2d5108 100644 --- a/modules/gltf/doc_classes/GLTFSkin.xml +++ b/modules/gltf/doc_classes/GLTFSkin.xml @@ -5,6 +5,7 @@ + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFSpecGloss.xml b/modules/gltf/doc_classes/GLTFSpecGloss.xml index d64a9189204..722fa5e9ae3 100644 --- a/modules/gltf/doc_classes/GLTFSpecGloss.xml +++ b/modules/gltf/doc_classes/GLTFSpecGloss.xml @@ -7,6 +7,7 @@ KHR_materials_pbrSpecularGlossiness is an archived GLTF extension. This means that it is deprecated and not recommended for new files. However, it is still supported for loading old files. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness diff --git a/modules/gltf/doc_classes/GLTFState.xml b/modules/gltf/doc_classes/GLTFState.xml index ba1c531283b..e2560417377 100644 --- a/modules/gltf/doc_classes/GLTFState.xml +++ b/modules/gltf/doc_classes/GLTFState.xml @@ -8,6 +8,7 @@ GLTFState can be populated by [GLTFDocument] reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a GLTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by [GLTFDocumentExtension] classes. This allows for custom data to be stored in the GLTF file or for custom data to be converted to/from Godot nodes. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/asset.schema.json" diff --git a/modules/gltf/doc_classes/GLTFTexture.xml b/modules/gltf/doc_classes/GLTFTexture.xml index 41c20439ea0..dd323b753b1 100644 --- a/modules/gltf/doc_classes/GLTFTexture.xml +++ b/modules/gltf/doc_classes/GLTFTexture.xml @@ -5,6 +5,7 @@ + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/gltf/doc_classes/GLTFTextureSampler.xml b/modules/gltf/doc_classes/GLTFTextureSampler.xml index 027d35e9d21..2b5bad67246 100644 --- a/modules/gltf/doc_classes/GLTFTextureSampler.xml +++ b/modules/gltf/doc_classes/GLTFTextureSampler.xml @@ -7,6 +7,7 @@ Represents a texture sampler as defined by the base GLTF spec. Texture samplers in GLTF specify how to sample data from the texture's base image, when rendering the texture on an object. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html diff --git a/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml b/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml index 7e3af6688ae..d2f6745e2f6 100644 --- a/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml +++ b/modules/vorbis/doc_classes/AudioStreamOggVorbis.xml @@ -7,6 +7,7 @@ The AudioStreamOggVorbis class is a specialized [AudioStream] for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the [AudioStreamWAV] class. + $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html