# SOME DESCRIPTIVE TITLE. # Copyright (C) 2014-2022, Juan Linietsky, Ariel Manzur and the Godot community (CC-BY 3.0) # This file is distributed under the same license as the Godot Engine package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Godot Engine 3.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-09-09 16:03+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:4 msgid "Custom resource format loaders" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:7 msgid "Introduction" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:9 msgid "ResourceFormatLoader is a factory interface for loading file assets. Resources are primary containers. When load is called on the same file path again, the previous loaded Resource will be referenced. Naturally, loaded resources must be stateless." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:14 msgid "This guide assumes the reader knows how to create C++ modules and Godot data types. If not, refer to this guide :ref:`doc_custom_modules_in_c++`." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:18 #: ../../docs/development/cpp/custom_resource_format_loaders.rst:39 #: ../../docs/development/cpp/custom_resource_format_loaders.rst:303 #: ../../docs/development/cpp/custom_resource_format_loaders.rst:356 msgid "References" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:20 msgid ":ref:`ResourceLoader`" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:21 #: ../../docs/development/cpp/custom_resource_format_loaders.rst:358 msgid "`core/io/resource_loader.cpp `_" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:24 msgid "What for?" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:26 msgid "Adding new support for many file formats" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:27 msgid "Audio formats" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:28 msgid "Video formats" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:29 msgid "Machine learning models" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:32 msgid "What not?" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:34 msgid "Raster images" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:36 msgid "ImageFormatLoader should be used to load images." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:41 msgid "`core/io/image_loader.h `_" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:45 msgid "Creating a ResourceFormatLoader" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:47 msgid "Each file format consist of a data container and a ``ResourceFormatLoader``." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:49 msgid "ResourceFormatLoaders are usually simple classes which return all the necessary metadata for supporting new extensions in Godot. The class must return the format name and the extension string." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:53 msgid "In addition, ResourceFormatLoaders must convert file paths into resources with the ``load`` function. To load a resource, ``load`` must read and handle data serialization." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:109 msgid "Creating a ResourceFormatSaver" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:111 msgid "If you'd like to be able to edit and save a resource, you can implement a ``ResourceFormatSaver``:" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:158 msgid "Creating custom data types" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:160 msgid "Godot may not have a proper substitute within its :ref:`doc_core_types` or managed resources. Godot needs a new registered data type to understand additional binary formats such as machine learning models." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:164 msgid "Here is an example of creating a custom datatype:" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:262 msgid "Considerations" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:264 msgid "Some libraries may not define certain common routines such as IO handling. Therefore, Godot call translations are required." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:267 msgid "For example, here is the code for translating ``FileAccess`` calls into ``std::istream``." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:305 msgid "`istream `_" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:306 msgid "`streambuf `_" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:307 msgid "`core/io/fileaccess.h `_" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:310 msgid "Registering the new file format" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:312 msgid "Godot registers ``ResourcesFormatLoader`` with a ``ResourceLoader`` handler. The handler selects the proper loader automatically when ``load`` is called." msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:361 msgid "Loading it on GDScript" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:363 msgid "Save a file called ``demo.json`` with the following contents and place it in the project's root folder:" msgstr "" #: ../../docs/development/cpp/custom_resource_format_loaders.rst:379 msgid "Then attach the following script to any node::" msgstr "" #: ../../docs/:0 msgid "Translation status" msgstr ""