You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Add color channel filter to editor texture previews
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
class AspectRatioContainer;
|
||||
class ColorRect;
|
||||
class TextureRect;
|
||||
class ShaderMaterial;
|
||||
class ColorChannelSelector;
|
||||
|
||||
class TexturePreview : public MarginContainer {
|
||||
GDCLASS(TexturePreview, MarginContainer);
|
||||
@@ -47,10 +49,14 @@ private:
|
||||
TextureRect *texture_display = nullptr;
|
||||
|
||||
MarginContainer *margin_container = nullptr;
|
||||
Control *outline_overlay = nullptr;
|
||||
AspectRatioContainer *centering_container = nullptr;
|
||||
ColorRect *bg_rect = nullptr;
|
||||
TextureRect *checkerboard = nullptr;
|
||||
Label *metadata_label = nullptr;
|
||||
Ref<ShaderMaterial> material;
|
||||
|
||||
ColorChannelSelector *channel_selector = nullptr;
|
||||
|
||||
Color cached_outline_color;
|
||||
|
||||
@@ -61,6 +67,8 @@ protected:
|
||||
void _notification(int p_what);
|
||||
void _update_texture_display_ratio();
|
||||
|
||||
void on_selected_channels_changed();
|
||||
|
||||
public:
|
||||
TextureRect *get_texture_display();
|
||||
TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata);
|
||||
|
||||
Reference in New Issue
Block a user