public sealed class TerrainModuleDoc 31's toolset, registering itself through the door a third party comes through.
Remarks
Two modes, five panels, and everything that binds them to the scene in front of them. All of it used to be two partials of the editor's application — EditorTerrainPanels and EditorTerrainSession, 1,340 lines — which meant the terrain tools could only exist in an editor that had been compiled with them. Doc 36 § F2 is the finding; this type is the answer for this feature.
⚠ What it takes from the host, it asks for. The project and the scene, through PluginServices.Require. A host that has not got one refuses the module with a sentence naming it, rather than throwing a null reference from inside Activate.
⚠ Two hooks that had to be built for this, because the application used to do both by hand. PluginContext.OnUpdate — the brush follows the entity selection, and nothing raises an event about that — and EditorDocument.Saved, because a scene names a heightfield and a foliage file beside itself and saving one without the others leaves a project whose ground exists only in a process that has exited. Both were a line the application had to know to write, and the second feature with sidecars would have been a second line.
Fields and properties (2)
public const string ModuleIdWhat the host activates it under, and what a plugin depending on it names.
public const string ModuleNameWhat a plugin-management panel calls it.
Methods (1)
public void Activate(PluginContext context)Adds everything the plugin contributes.
Used by (2)
- EditorModulesVixen.Editor.Host
- SceneTerrainsVixen.Editor.Terrain