.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.

.. _class_EditorResourcePreview:

EditorResourcePreview
=====================

**Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`

**Category:** Core

Brief Description
-----------------

Helper to generate previews of reources or files.

Member Functions
----------------

+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void  | :ref:`add_preview_generator<class_EditorResourcePreview_add_preview_generator>`  **(** :ref:`EditorResourcePreviewGenerator<class_editorresourcepreviewgenerator>` generator  **)**                                                                                             |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void  | :ref:`check_for_invalidation<class_EditorResourcePreview_check_for_invalidation>`  **(** :ref:`String<class_string>` path  **)**                                                                                                                                                |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void  | :ref:`queue_edited_resource_preview<class_EditorResourcePreview_queue_edited_resource_preview>`  **(** :ref:`Resource<class_resource>` resource, :ref:`Object<class_object>` receiver, :ref:`String<class_string>` receiver_func, :ref:`Variant<class_variant>` userdata  **)** |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void  | :ref:`queue_resource_preview<class_EditorResourcePreview_queue_resource_preview>`  **(** :ref:`String<class_string>` path, :ref:`Object<class_object>` receiver, :ref:`String<class_string>` receiver_func, :ref:`Variant<class_variant>` userdata  **)**                       |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void  | :ref:`remove_preview_generator<class_EditorResourcePreview_remove_preview_generator>`  **(** :ref:`EditorResourcePreviewGenerator<class_editorresourcepreviewgenerator>` generator  **)**                                                                                       |
+-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Signals
-------

-  **preview_invalidated**  **(** :ref:`String<class_string>` path  **)**
If a preview was invalidated (changed) this signal will emit (using the path of the preview)


Description
-----------

This object is used to generate previews for resources of files.

Member Function Description
---------------------------

.. _class_EditorResourcePreview_add_preview_generator:

- void  **add_preview_generator**  **(** :ref:`EditorResourcePreviewGenerator<class_editorresourcepreviewgenerator>` generator  **)**

Create an own, custom preview generator.

.. _class_EditorResourcePreview_check_for_invalidation:

- void  **check_for_invalidation**  **(** :ref:`String<class_string>` path  **)**

Check if the resource changed, if so it will be invalidated and the corresponding signal emitted.

.. _class_EditorResourcePreview_queue_edited_resource_preview:

- void  **queue_edited_resource_preview**  **(** :ref:`Resource<class_resource>` resource, :ref:`Object<class_object>` receiver, :ref:`String<class_string>` receiver_func, :ref:`Variant<class_variant>` userdata  **)**

Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.

.. _class_EditorResourcePreview_queue_resource_preview:

- void  **queue_resource_preview**  **(** :ref:`String<class_string>` path, :ref:`Object<class_object>` receiver, :ref:`String<class_string>` receiver_func, :ref:`Variant<class_variant>` userdata  **)**

Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texure (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.

.. _class_EditorResourcePreview_remove_preview_generator:

- void  **remove_preview_generator**  **(** :ref:`EditorResourcePreviewGenerator<class_editorresourcepreviewgenerator>` generator  **)**

Remove a custom preview generator.


