public sealed class BlockoutModeThe viewport mode the grey-boxing tools live in.
Remarks
The second mode, and the one doc 20's IEditorMode was written for. A1 asks for the interface to ship with one mode so the seam is proven; doc 24's B2 is the argument that a seam with one implementation is a hypothesis, and that blockout is what turns it into a consumer — because it needs first refusal on viewport input, its own toolbar, and a claim on keys that already mean something.
⚠ So far it owns its keys and nothing else, and that is doc 24's P0 exactly. There is no editable mesh in the engine yet — Core/Vixen.Geometry is P1 — so Element is a statement about what a click would select rather than something that selects it, and Pointer declines every event. What is real is the arbitration: while this mode is active 1, 2, 3 and 4 in the viewport are the element modes, and while it is not they are view-bookmark recall. That is the thing that could not be retrofitted, and it is the thing this mode is here to prove.
⚠ The element commands are registered whether or not the mode is active, and scoped so that they are only reachable while it is. Registering them from Activated would keep them out of the keybinding editor and out of the palette until somebody had entered the mode once, which is how a rebindable shortcut becomes undiscoverable.
Fields and properties (80)
public const string ModeIdWhat the mode is called, everywhere an id is wanted.
public const string BlockoutContextThe command context the mode claims while it is active.
public string IdWhat everything refers to it by: select, blockout.
public StringId TitleWhat the mode bar's button says.
public PathBuilder? Iconpublic IconArt? ArtColoured art for the mode's button, drawn with the title underneath.
public string? ContextWhich command context the mode claims while it is active, or .
public string? Panelpublic IReadOnlyList<ToolbarEntry> Toolbarpublic BlockoutElement ElementWhat a click in the viewport would select.
public MeshEdit? EditingThe editing state the mode drives, or when it drives none.
public ShapeDrag? DragThe shape-tool gesture, or null while the mode drives no scene.
public const string ToggleMeshCommandThe command that enters and leaves the mesh.
public const string SelectLoopCommandSelects the edge loop through the active edge.
public const string SelectRingCommandSelects the edge ring through it.
public const string GrowCommandTakes in everything touching the selection.
public const string ShrinkCommandGives back everything on its rim.
public const string SelectGroupCommandSelects every face in the active face's group.
public const string SelectCoplanarCommandSelects every face coplanar with and joined to it.
public const string SelectLinkedCommandSelects every face joined to it.
public const string SelectAllCommandSelects every element of the current mode.
public const string SelectNoneCommandDeselects everything.
public const string InvertCommandSelects what is not selected.
public const string ExtrudeCommandPulls the selected faces out along their normal.
public const string ExtrudeIndividualCommandDitto, one face at a time.
public const string InsetCommandShrinks them towards their own centre.
public const string InsetIndividualCommandDitto, one face at a time.
public const string BevelCommandCuts the corner off the selected edges.
public const string LoopCutCommandPuts a loop across the ring the active edge is part of.
public const string SubdivideCommandSplits the selected faces into one face per corner.
public const string BridgeCommandJoins two selected faces with a tube.
public const string FillCommandPuts a face across a hole.
public const string FlipCommandTurns the selected faces inside out.
public const string WeldCommandMerges the selected positions into one.
public const string DissolveCommandRemoves the selected edges and keeps the surface.
public const string DeleteCommandRemoves the selected faces, leaving a hole.
public const string DetachCommandTakes the selected faces out into an entity of their own.
public const string ShapeToolCommandArms the shape tool, so a drag on the work plane makes geometry.
public const string CreateShapeCommandMakes one of the current shape at its default size, at the work plane's origin.
public const string CubeGridCommandPuts a box on the lattice at the work plane's origin.
public const string PushOutCommandPushes the selected box's far side out by a cell, and its near side with Shift.
public const string PushInCommandAnd pulls it in.
public const string DuplicateCommandCopies what is selected.
public const string MirrorCommandReflects a copy of it across the work plane.
public const string ArrayCommandRepeats it along a line.
public const string RadialCommandRepeats it round a circle.
public const string ProjectWorldCommandProjects the selected faces' texture coordinates in world space.
public const string ProjectBoxCommandDitto in the object's own space.
public const string FitUvCommandStretches each selected face's coordinates to cover one repeat.
public const string SmoothCommandPuts the selected faces in a smoothing group.
public const string HardenCommandTakes them out of one.
public const string AutoSmoothCommandGroups the whole mesh's faces by how sharply they meet.
public const string NewGroupCommandPuts the selected faces in a face group of their own.
public const string UnionCommandEverything in either of the selected solids, as a derived result.
public const string SubtractCommandThe first selected solid, less the rest.
public const string IntersectCommandOnly what all the selected solids share.
public const string ApplyBooleanCommandCollapses a derived result into a plain mesh and deletes its operands.
public const string PlaneCutCommandCuts the selection with the work plane and keeps the near half.
public const string TrimCommandCuts the first selected solid by the second's surface.
public const string BakeCommandWrites the selection into a mesh asset and points the entity at it.
public const string EditableCommandMakes an entity's mesh asset editable again.
public const string ExportObjCommandWrites the selection out as a Wavefront OBJ.
public const string ExportGltfCommandDitto as a glTF.
public static IReadOnlyList<string> BooleanCommandsEvery boolean and cut, in the order the menu lists them.
public static IReadOnlyList<string> HandoffCommandsAnd every handoff verb.
public static IReadOnlyList<string> CreationCommandsEvery creation verb, in the order the menu lists them.
public static IReadOnlyList<string> SurfaceCommandsAnd every surface verb.
public static IReadOnlyList<string> GeometryCommandsEvery geometry verb, in the order the menu lists them.
public float StepHow far a verb run from the keyboard moves geometry, in the mesh's own space.
public int BevelSegmentsHow many faces across a bevel run from the keyboard is.
public ShapeKind ShapeWhich shape the shape tool makes.
public bool IsArmedWhether a drag on the work plane makes a shape rather than starting a rubber-band.
public WorkPlane? PlaneThe work plane shapes are dragged on, or for the ground.
public static IReadOnlyList<string> SelectionCommandsEvery command the mode registers, in the order the menu lists them.
public float UvScaleHow many world units one repeat of a texture covers, for the projection verbs.
public int CopiesHow many copies an array verb makes.
public IMeshBaker? BakerWhat puts a baked mesh into the project, or null while nothing can.
public IMeshSource? MeshesWhere a mesh reference's geometry comes from, for making one editable again.
public Action<string, string>? ExportWhat to do with an exported file: its text and its extension.
public static IReadOnlyList<ShapeKind> KindsEvery shape the tool can make, in the order a menu should offer them.
Events (1)
public Action<BlockoutElement>? ElementChangedRaised when Element changes.
Methods (11)
public static MeshElementKind? Kind(BlockoutElement element)Which element kind an element mode means to the kernel.
public static string ElementCommand(BlockoutElement element)What the command that selects an element mode is called.
public static string KindCommand(ShapeKind kind)What the command that creates a shape of a kind is called.
public void Register(EditorShell shell)Puts the mode's commands, bindings and panels into the shell.
public void Unregister(EditorShell shell)Takes them back out.
public void Activated()The mode has become the active one.
public void Deactivated()public bool Pointer(PointerEvent args)public bool Key(KeyEvent args)public bool Pointer(SceneViewport pane, PointerEvent args)public bool Key(SceneViewport pane, KeyEvent args)
Used by (4)
- BlockoutModeTestsVixen.Editor.Blockout.Tests
- BlockoutModuleVixen.Editor.Blockout
- BlockoutSelectionTestsVixen.Editor.Blockout.Tests
- EditorModeTestsVixen.Editor.App.Tests