Refactor Scene Controls to use an Array structure with a Hook for modules to modify the control buttons
The underlying data for scene controls is in a function which is not easily accessible for modders who want to add extra buttons. This means you have to use the overall application render hook (or some other hacky solution)
The data structure is an Object with named keys which means adding new buttons in between existing ones requires the object to be rebuilt
Proposed Solution: Adopt the approach used by the
ContextMenu to express the Scene Control buttons as an
Array so that new entries can be pushed or spliced as needed. Add a Hook for
getSceneControlButtons (or something similarly named) which exposes the Array that is about to be rendered so mod developers can introduce new buttons or tools at render-time.