[v2.1.beta.official] How to create proper skeleton+gdscript for main screen plugin (2D,3D,Script,...)?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gau_veldt
:warning: Old Version Published before Godot 3 was released.

Part of the discussion started at the Facebook Group Page

The offline help indicates two override methods that relate to and state their use is for “main-screen” plugins that show up in the area given to 2D, 3D, Script, etc.:

bool has_main-screen() virtual

“Return true if this is a main screen editor plugin (it goes in the main screen selector together with 2D, 3D, Script).”

String get_name() virtual

“Get the name of the editor plugin. For main scren plugins this is what will appear in the selector (which by default is 2D, 3D, Script).”

That is a start but there is no mention of how to put the plugin’s preloaded scene instance into the main screen’s area. One might think of add_control_to_container or add_control_to_dock but none of the constants listed on the help page look like they refer to the main screen. Furthermore if just get_name() and has_main_screen() overridden (without a scene) the name appears in the selector (and of course shows a blank screen when selected since no scene’s been attached) but the name stays there when the plugin is disabled (remember we had no initialization code to get the name there (it’s just method overrides) so it’s not certain what un-initialization calls, if any, would remove the plugin name from the main screen selector). It’s possible this is a bug too but the sketchy information I’ve gleaned far from neither confirms nor denies that possibility.

Does anyone know what to add to a plugin’s gdscript to get this going properly?