EditorResourcePreview

Helper to generate previews of resources or files.

This object is used to generate previews for resources of files. Note: This class shouldn't be instantiated directly. Instead, access the singleton using EditorInterface.getResourcePreviewer.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_previewReady
void _previewReady(String arg0, Texture arg1, Texture arg2, long arg3, String arg4, VariantArg5 arg5)
addPreviewGenerator
void addPreviewGenerator(EditorResourcePreviewGenerator generator)

Create an own, custom preview generator.

checkForInvalidation
void checkForInvalidation(String path)

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

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(EditorResourcePreview other)
opEquals
bool opEquals(typeof(null) n)
queueEditedResourcePreview
void queueEditedResourcePreview(Resource resource, GodotObject receiver, String receiver_func, VariantArg3 userdata)

Queue the resource being edited for preview. Once the preview is ready, the receiver's receiver_func will be called. The receiver_func must take the following four arguments: String path, Texture preview, Texture thumbnail_preview, Variant userdata. userdata can be anything, and will be returned when receiver_func is called. Note: If it was not possible to create the preview the receiver_func will still be called, but the preview will be null.

queueResourcePreview
void queueResourcePreview(String path, GodotObject receiver, String receiver_func, VariantArg3 userdata)

Queue a resource file located at path for preview. Once the preview is ready, the receiver's receiver_func will be called. The receiver_func must take the following four arguments: String path, Texture preview, Texture thumbnail_preview, Variant userdata. userdata can be anything, and will be returned when receiver_func is called. Note: If it was not possible to create the preview the receiver_func will still be called, but the preview will be null.

removePreviewGenerator
void removePreviewGenerator(EditorResourcePreviewGenerator generator)

Removes a custom preview generator.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
EditorResourcePreview _new()

Construct a new instance of EditorResourcePreview. Note: use memnew!EditorResourcePreview instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta