Small features to make Field more fluid

This page collects, in rapid fire order, the small features that make using Field more fun and fluid. Keyboard shortcuts, tricks and other little gems that get buried in the documentation.

Keyboard shortcuts your fingers should know

Creating and destroying things

  • N — The opening prompt on the canvas tells you — but you can type 'n' to make a new "vanilla" box for code where the mouse is. No need to go to the right-click menu.
  • P — Likewise 'p' gets you a new spline drawer
  • command-delete — this deletes all of the selected elements in the canvas.

Controlling the canvas

  • middle-mouse — middle mouse button pans the canvas around — it's not just a blank page, it's an infinite blank page. Trackpad gestures &mdash pan and zoom &mdash also work.
  • F1 — If you get lost F1 takes you back. Double clicking on an element in the Selection Palette moves you over to that element.

Scrubbing things

  • K — the K key links mouse drag to the red line that starts off hiding at the left edge of the screen regardless of where you are actually clicking. This line executes things that it intersects with. We stole this from Maya.

  • L — the L key makes a new time slider just the the red one except: 1) it's blue, and 2) it only effects the boxes you have selected at the time you push 'L'. Pressing L again makes it go away, but you can right-click on the slider to start it looping and so on. Once you've done that, the K key controls this "disposable" time slider.

Executing things

  • command--zero — executes everything in a text editor window. It's as if you selected all the text and pressed command--return (and then put your selection back the way it was).

  • page up & page down — page up and page down in the canvas start and stop things. You don't even have to select them, just over the mouse over them. If you do select a bunch of things you can start them all off (or stop them).

  • The ruler in the text editor. Lot's of people miss the little bracket things in the text editor. Option-clicking them executes all the text inside them. But so does command--left-arrow. Right clicking brings up a menu of interesting things. You can even assign keyboard shortcuts to them. Orange shows you things that you generally execute next (to guide you through repeating yourself)

Not typing as much

  • Autocompletion — Who likes typing out the names of variables and classes? We don't. command--period looks at what's on the left hand side of the cursor and pops up a menu of possible things you could have typed. Just start moving down or up with the arrow keys or keep typing to narrow the options a little more. Autocompletion will also show you fields that are hidden if you tap the option key.

  • Import help — But to autocomplete something Field needs to know about it, for Field to know about it you have to 'import it' first. That's just the way that Python works. If you know that a class exists, just start typing it's name and hit command--i. Field will try to "autocomplete" the class name. Pressing return will complete the classname, import it and add the code to import it in the future to the top of the editor all at once. As soon as you do that press command--period and you'll get help on the constructor that you are about to call.

Built in code classes

  • SimpleLinearAlgebra — linear algebra can be hard, but it's inevitable, and Field comes with some classes to make it easy to write if not easy to understand. You can either write things like:
x = 4
y = 20
z = 2.4
px = (x+4.0)*2.0
py = (y+4.0)*2.0
pz = (z+4.0)*2.0
dot = px*x+py*y+pz*z

Or you can write things like this:

v = Vector3(4, 20, 2.4)
pv = (v+4.0)*2.0
dot = v.dot(pv)

Even if you are allergic to math, you should see how this might be a good thing. Color's are Vector4 (or Color4 if you like), Points in 3d space are Vector3, Points in 2d space are Vector2.

Tricks with copy and paste

  • Copy and Paste in Field are implemented by saving parts of the document to a temporary file and then passing around a reference to that file. This means that you can copy elements from Field and paste them into the finder and you'll get a .fieldpackage file. Double click on that and Field will ask you if you want to import it. But this also means that you can "paste" Field clipboards into Mail, and our favorite — iChat conversations.