+1 vote


The "Making plugins" tutorial lets us create a new tab alongside with 2D/3D/Script/AssetLib, called "Main Screen Plugin".

It contains either a scene or an object. But it doesn't replicate the 2D interface, with its grid, settings and behaviour. How to duplicate the 2D interface in order to extend it ?

I tried using a CanvasItemEditor but it doesn't make sense to me as there are many other childs to be created.

Any lead on where to look ? Either in GDScript or C++, I got the sources and am trying to figure out how these work.

I got this info by printing :
And the result is :
[[CanvasItemEditor:10111], [SpatialEditor:10349], [ScriptEditor:10702], [EditorAssetLibrary:12026], other stuff goes here by probably has is_main_screen on false ]

Any leads would be welcome, I primarily would like to understand the architecture before doing anything, see all the options.
I plan to make a custom editor in order to make it easier to edit a particular material, with multiple Curve2D etc.

Thank you !

in Engine by (21 points)

I found an addon which lets you "inspect" editor nodes. Like if you hover over an editor node and press F12, you'll get it's name and everything. Here it is: https://github.com/Zylann/godot_editor_debugger_plugin
It should help you understand the structure of the editor.

1 Answer

0 votes

I myself don't know anything about it, but you can look into Godot source on GitHub.

by (94 points)

Actually since they only want to copy the structure you can use ResourceSaver in a toolScript to save the top most node as a Tscn then open it Godot for editing and modifications

Oh god, that's clever. Didn't think of that. Maybe you should write it as an answer. Or maybe create the actual script. Or maybe I'll do it.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.