Vixen
feb85697
csharp
public interface IBlockout

Doc 24's blockout verbs, as a service: what the mode's commands run and a plugin can call.

Read the guide page for this →

Remarks

Doc 50 § D2 one level down (#1307). The verbs were closures inside BlockoutMode.Register, over the mode's fields — so a plugin that wanted "subtract the selection, undoably, the way the menu does" could not have it, and a test that wanted it had to stand a shell up and run a command. They are methods here; the mode's commands are names for them, and BlockoutModule publishes this so context.Services.Require<IBlockout>() reaches the same behaviour.

⚠ Each verb acts on what the editor is editing now and does nothing without it. The element verbs need a mesh being edited; the rest need a scene. With neither they answer , zero or Null rather than throwing, which is what a command run from a palette with nothing open has always done.

⚠ The dials they read are the mode's — the step, the bevel segments, the UV scale, the copy count, the shape kind, the retopology settings — because those are what the settings panel edits and what a designer set a moment ago. A verb that took its own would be a second answer to "how far does Extrude go".

Methods (44)

  • bool SelectLoop()

    Selects the edge loop through the active edge.

  • bool SelectRing()

    Selects the edge ring through it.

  • bool Grow()

    Takes in everything touching the selection.

  • bool Shrink()

    Gives back everything on its rim.

  • bool SelectGroup()

    Selects every face in the active face's group.

  • bool SelectCoplanar()

    Selects every face coplanar with and joined to it.

  • bool SelectLinked()

    Selects every face joined to it.

  • bool SelectAll()

    Selects every element of the current element mode.

  • bool SelectNone()

    Deselects everything.

  • bool Invert()

    Selects what is not selected.

  • bool Extrude(bool individually = false)

    Pulls the selected faces out along their normal by the mode's step.

  • bool Inset(bool individually = false)

    Shrinks the selected faces towards their own centre.

  • bool Bevel()

    Cuts the corner off the selected edges.

  • bool LoopCut()

    Puts a loop across the ring the active edge is part of.

  • bool Subdivide()

    Splits the selected faces into one face per corner.

  • bool Bridge()

    Joins two selected faces with a tube.

  • bool FillHole()

    Puts a face across a hole.

  • bool Flip()

    Turns the selected faces inside out.

  • bool Weld()

    Merges the selected positions into one.

  • bool Dissolve()

    Removes the selected edges and keeps the surface.

  • bool Delete()

    Removes the selected faces, leaving a hole.

  • bool Detach()

    Takes the selected faces out into an entity of their own.

  • bool Project(UvProjection projection)

    Projects the selected faces' texture coordinates, at the mode's UV scale.

  • bool FitUvs()

    Stretches each selected face's coordinates to cover one repeat.

  • bool Smooth(bool smooth = true)

    Puts the selected faces in a smoothing group, or takes them out of one.

  • bool AutoSmooth()

    Groups the whole mesh's faces by how sharply they meet.

  • bool NewGroup()

    Puts the selected faces in a face group of their own.

  • Entity CreateShape()

    Makes one of the mode's current shape at its default size, at the work plane's origin, and selects it.

  • Entity CubeGrid(GridBox? at = null)

    Puts a box on the lattice, and selects it.

  • bool Push(int cells)

    Pushes the selected boxes' far side along the work plane's second axis.

  • int Duplicate()

    Copies what is selected.

  • int Mirror()

    Reflects a copy of what is selected across the work plane.

  • int Repeat(bool radial)

    Repeats the first selected entity along a line, the mode's step apart.

  • Entity Union()

    Everything in either of the selected solids, as a derived result.

  • Entity Subtract()

    The first selected solid, less the rest.

  • Entity Intersect()

    Only what all the selected solids share.

  • bool ApplyBoolean()

    Collapses the selected derived results into plain meshes and deletes their operands.

  • int PlaneCut()

    Cuts the selection with the work plane and keeps the near half.

  • bool Trim()

    Cuts the first selected solid by the second's surface.

  • int Retopologize()

    Replaces the selected solids with all-quad meshes of the same shape, at the mode's settings.

  • bool ToggleRemeshDebug()

    Captures doc 41 § D1's per-stage artefacts for the selected solid, or clears a capture.

  • int Bake()

    Writes the selection into mesh assets and points the entities at them.

  • int MakeEditable()

    Gives the selected mesh references their geometry back as editable meshes.

  • bool Export(string extension)

    Exports the selection and hands the text to the mode's export callback.

Used by (4)

  • BlockoutModeVixen.Editor.Blockout
  • BlockoutReachTestsVixen.Editor.App.Tests
  • BlockoutVerbTestsVixen.Editor.Blockout.Tests
  • BlockoutVerbsVixen.Editor.Blockout