How to add option to default Inspector Image Editor Property?

doedrimdoedrim Posts: 2Member
edited June 27 in Programming


I have started playing around with extending the Godot editor. For starters, I am not implementing any of the backing logic yet, I'm just trying to get the IDE integration right. My current experiment is to add an Edit button to the image property of an ImageTexture. Using the Inspector Plugins tutorial I managed to do just that:

This works fine as an initial iteration, as it allows me to edit the image property with my custom editor while also maintaining the default editor in case I just want to load an existing image. My question is the following:

Can I extend the default Editor Property to incorporate an extra Edit button instead of adding a completely independent Edit button?

This would make the IDE integration much more professional. Rather than just having the property duplicated in the inspector, once with the custom editor and once with the default one, it would seem like it was part of the IDE all along. Some default Editor Properties already have such an Edit capability (e.g. the shape property of a CollisionShape2D), so there must be a way to integrate into that as well, or is it only possible from the C++ side of the editor?

Thanks in advance!

Tags :


  • TwistedTwiglegTwistedTwigleg Posts: 2,666Admin
    edited June 27

    Welcome to the forums @doedrim!

    This might be something to ask on the developer IRC, which you can find on the Community page on the Godot website, or by clicking "Community" on the top bar on the forums. Most of the engine developers are not that active on the forums, but those on the IRC may have a better idea on if it is possible and/or how to go about it.

  • SIsilicon28SIsilicon28 Posts: 715Moderator

    You could approach this the same way Godot does it with shaders: have the editor at the bottom as an expandable menu. This is doable with the EditorPlugin using the function add_control_to_bottom_panel(). Then you can put your image editor in there. :)

  • doedrimdoedrim Posts: 2Member

    Thank you for your replies @TwistedTwigleg and @SIsilicon28!

    I think I'll give it a try with the bottom panel approach and see how that one feels like. If I end up not liking it much I'll try to approach this topic again on the IRC.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file