Some Questions about extending the Editor

Hello fellow UE4 Programmers,

I have some Questions regarding Editor Programming. So far I got my Custom Editor Mode Working that draws a Box in the Viewport using FPrimitiveDrawInterface. Now I have a couple of questions:

  1. How do I draw a mesh using FPrimitiveDrawInterface ? Or what would be a good way to render a mesh in the editor viewport for my Custom editor? Think of the move widget as an example.
  2. Some Function that use FPrimitiveDrawInterface DrawDirectionalArrow require a FMatrix. How do I use those?
  3. How do I write Interactions for my custom editor mode? Like dragging an arrow inside the viewport. I tried finding my way arround in the LevelEditor code, but since it is so big it is really hard for me to understand.

Help is much appreciated!

Lets bump this.

  1. Primitive Mesh is for … primitive… meshes. Anything else, just load as a StaticMesh and render that.
  2. FMatrix is just a traditional rotation/scale/translation matrix. Things like FTransform have convert methods to give you an FMatrix(ToMatrixNoScale, ToMatrixWithScale, etc).
  3. All of that is handled through custom drag/drop operators or state machines that run for a given mode. Check out DragTool_BoxSelect.cpp for an example of how selecting multiple actors with a box shape is done.