1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Renamed EditorResourcePreviewGenerator.should_generate_small_preview() to generate_small_preview_automatically()

Added can_generate_small_preview() so the generator uses generate() or generate_from_path() if it returns true
Added can_generate_small_preview() and generate_small_preview_automatically() to the scripting languages
This commit is contained in:
MrCdK
2019-05-20 10:45:12 +02:00
parent a940b4cf64
commit f8a9844d80
5 changed files with 57 additions and 13 deletions

View File

@@ -78,7 +78,7 @@ bool EditorTexturePreviewPlugin::handles(const String &p_type) const {
return ClassDB::is_parent_class(p_type, "Texture");
}
bool EditorTexturePreviewPlugin::should_generate_small_preview() const {
bool EditorTexturePreviewPlugin::generate_small_preview_automatically() const {
return true;
}
@@ -186,7 +186,7 @@ Ref<Texture> EditorImagePreviewPlugin::generate(const RES &p_from, const Size2 p
EditorImagePreviewPlugin::EditorImagePreviewPlugin() {
}
bool EditorImagePreviewPlugin::should_generate_small_preview() const {
bool EditorImagePreviewPlugin::generate_small_preview_automatically() const {
return true;
}
////////////////////////////////////////////////////////////////////////////
@@ -250,7 +250,7 @@ Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size2
return ptex;
}
bool EditorBitmapPreviewPlugin::should_generate_small_preview() const {
bool EditorBitmapPreviewPlugin::generate_small_preview_automatically() const {
return true;
}
@@ -317,7 +317,7 @@ bool EditorMaterialPreviewPlugin::handles(const String &p_type) const {
return ClassDB::is_parent_class(p_type, "Material"); //any material
}
bool EditorMaterialPreviewPlugin::should_generate_small_preview() const {
bool EditorMaterialPreviewPlugin::generate_small_preview_automatically() const {
return true;
}