Skip to content

Commit 86e0c22

Browse files
committed
Merge pull request #112375 from timothyqiu/dpi-texture-preview
Allow previewing DPITexture in Inspector
2 parents 7fa41cf + 8cf3499 commit 86e0c22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

editor/scene/texture/texture_editor_plugin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
#include "scene/resources/animated_texture.h"
4141
#include "scene/resources/atlas_texture.h"
4242
#include "scene/resources/compressed_texture.h"
43+
#include "scene/resources/dpi_texture.h"
4344
#include "scene/resources/image_texture.h"
4445
#include "scene/resources/portable_compressed_texture.h"
45-
#include "scene/resources/style_box_flat.h"
4646

4747
constexpr const char *texture_2d_shader_code = R"(
4848
shader_type canvas_item;
@@ -311,7 +311,7 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) {
311311
}
312312

313313
bool EditorInspectorPluginTexture::can_handle(Object *p_object) {
314-
return Object::cast_to<ImageTexture>(p_object) != nullptr || Object::cast_to<AtlasTexture>(p_object) != nullptr || Object::cast_to<CompressedTexture2D>(p_object) != nullptr || Object::cast_to<PortableCompressedTexture2D>(p_object) != nullptr || Object::cast_to<AnimatedTexture>(p_object) != nullptr || Object::cast_to<Image>(p_object) != nullptr;
314+
return Object::cast_to<ImageTexture>(p_object) != nullptr || Object::cast_to<AtlasTexture>(p_object) != nullptr || Object::cast_to<CompressedTexture2D>(p_object) != nullptr || Object::cast_to<PortableCompressedTexture2D>(p_object) != nullptr || Object::cast_to<AnimatedTexture>(p_object) != nullptr || Object::cast_to<DPITexture>(p_object) != nullptr || Object::cast_to<Image>(p_object) != nullptr;
315315
}
316316

317317
void EditorInspectorPluginTexture::parse_begin(Object *p_object) {

0 commit comments

Comments
 (0)