HammeriteMapEditorSettings
Editor. Inherits Resource
The project's starting configuration for HammeriteMapEditor: its palette, its starting UI scale, and the defaults of the options an author can toggle.
Assign one to HammeriteMapEditor.settings - a .tres the game ships, say. The editor keeps a copy and never writes to what it was given: what a person chose is kept in HammeriteEditorWorkspace instead, and wins over the values here for every option they have turned.
Properties
| Type | Name | Default |
|---|---|---|
float | ui_scale | 0.0 |
HammeriteEditorColors | colors | <unknown> |
bool | wysiwyg_previews | true |
bool | uv_lock | true |
bool | paint_uv_carries_texture | true |
bool | show_warnings | true |
bool | fade_off_cut | true |
int | viewport_focus_outline_thickness | 2 |
Property descriptions
ui_scale
var ui_scale: float = 0.0
How big the editor's own UI is, in physical pixels per UI unit - independent of what the host project does to its own (HammeriteEditorCanvas). 1.0 is what the editor is drawn for; 0 follows the screen's density (HammeriteEditorCanvas.screen_ui_scale()).
colors
var colors: HammeriteEditorColors = <unknown>
Every colour the editor draws the world in (#48) - the viewports, the overlays, the gizmos. A resource of its own so a game can hand the editor a palette, and so there is somewhere to LOOK at one; the editor's own chrome is HammeriteEditorTheme, which is a different question.
wysiwyg_previews
var wysiwyg_previews: bool = true
WYSIWYG tool previews: let the brush being drawn take part in the compiled world, so an air brush shows the room it is about to carve and a solid shows as real textured geometry, instead of a wireframe box. Costs a full worldrep recompile every time the preview changes shape, and the compiler is superlinear in structural brush count. Measured per drag frame: ~15ms with 1 room, ~31ms with 10, ~205ms with 40. So it is comfortable on a small map and unusable on a large one - hence the switch (W in the editor). If levels routinely pass a few dozen structural brushes, flip this default.
uv_lock
var uv_lock: bool = true
Carry a face's texture with it when the geometry moves, instead of letting the world-space projection slide the texture across the surface (#51). The editor-wide default: a face can pin itself either way with the uv_lock surface property, which is what a wall that must not move its texture while everything around it does is for.
paint_uv_carries_texture
var paint_uv_carries_texture: bool = true
Whether painting a face's UVs onto another carries its texture too (#71). On, because a UV transform is measured against a particular texture's size: the same numbers on a texture of another size land somewhere else, so the numbers without the picture are half an answer.
show_warnings
var show_warnings: bool = true
Draw edit-time warning markers in the 2D viewports: the graph validators' sliver gaps and ambiguous overlaps, and the last bake's failures. On by default - a warning nobody sees is the problem these solve - but they sit on top of the geometry, so turn them off while working on something dense. Editor-only either way: nothing draws these during gameplay.
fade_off_cut
var fade_off_cut: bool = true
Draw faintly, in a 2D view, what that view's cut does not pass through: the storeys above and below the one being worked on are otherwise drawn over it at full strength, and a level of any size is a tangle. Off, every outline is drawn alike.
viewport_focus_outline_thickness
var viewport_focus_outline_thickness: int = 2
How thick the outline round the focused view is, in one-pixel rings; 0 draws none. Its colour is HammeriteEditorColors.viewport_focus_outline.