Sub topic 8
Typing exact values
This chapter covers numeric input in Blender. It shows how to replace mouse dragging with typed numbers during a transform, and how the Transform panel handles typed numbers differently. It assumes you can select an object and start a move, rotate, or scale with G, R, and S. It also assumes you can lock a transform to an axis with X, Y, or Z, as covered in the previous chapter.
Why type values
Dragging with the mouse is fast but imprecise. Typing gives exact results you can repeat. It works the same way for every transform, so it is worth learning once.
The basic pattern
Typed numbers go between the transform key and the confirmation. The sequence is:
- Press G, R, or S to start the transform.
- Optionally press X, Y, or Z to constrain it.
- Type a number.
- Press Enter to confirm, or Esc to cancel.
While you type, the header of the 3D viewport shows the value you have entered. The object follows the number, not the mouse.
| Keys | Result |
|---|---|
| G X 3 Enter | Moves the object 3 units along the X axis |
| G Z -1.5 Enter | Moves it 1.5 units down along Z |
| R Z 90 Enter | Rotates it 90 degrees around Z |
| S 2 Enter | Scales it to twice its current size |
| S Z 0.5 Enter | Scales it to half its height |
What the number means for each transform
The number means something different for each transform.
- Move (G): The number is a distance in scene units. It is an offset from where the object started, not a position in the world. An object at X = 4 that you move with
G X 3ends at X = 7. - Rotate (R): The number is an angle in degrees. A positive value rotates one way and a negative value rotates the other. Like move, it is added to the current rotation.
- Scale (S): The number is a multiplier.
S 2doubles the size,S 0.5halves it, andS 1changes nothing.S -1mirrors the object through its pivot point.S 0flattens it to nothing, which is rarely what you want.
Always press an axis key first
If you type a number without choosing an axis, the result depends on your current view. The movement is applied in the screen's space, so the same keystrokes can move the object in different directions after you orbit the view. Pressing X, Y, or Z first removes that dependence. Do this by habit.
The constraint also controls which axes are affected:
- With an axis key, only that axis changes.
- With Shift plus an axis key, that axis is excluded and the other two change. For example,
G Shift+Zlimits a move to the XY plane.
Entering more than one value
A single number only affects one axis. To enter several values, press Tab after each one. Tab advances to the next axis field, and the header shows all three values as you go.
For example, to move an object by (1, 2, 3):
- Press G.
- Type
1, then press Tab. - Type
2, then press Tab. - Type
3, then press Enter.
The same approach works for non-uniform scale. For an object twice as wide, the same depth, and half as tall, press S, type 2, Tab, 1, Tab, 0.5, then Enter.
Editing while you type
These keys help when you make a mistake:
- Backspace removes the last character you typed.
- Typing
-flips the sign of the current value. - Typing
.adds a decimal point, so0.25can be typed as.25. - Esc or right-click cancels the whole transform and restores the object.
Units and expressions
Blender accepts units when the scene uses the Metric or Imperial unit system. The Unit Scale and Length settings are in the Scene properties. If the scene uses metric units, you can type G X 50cm or G Z 2m. Without units, the number is read in scene units.
To type a calculation instead of a number, press = or the numpad *. This opens expression mode, in which you can enter formulas such as 2*3.5 or sqrt(2). It is useful when the value comes from arithmetic, such as one third of a width.
Typing in the Transform panel
Press N in the 3D viewport to open the sidebar, then choose the Item tab to see the Transform panel. The fields there work differently from typing during G, R, and S.
| Row | During G, R, S | Transform panel |
|---|---|---|
| Meaning of the value | Change relative to the start | Final value |
| Example | `G X 3` adds 3 | Setting X to 3 puts the object at X = 3 |
| Confirmation | Enter | Enter, or click away |
| Moving between axes | Tab | Tab |
To edit a field, double-click it, type the new value, then press Enter. The field also accepts expressions and units. For example, 1/3 and 45cm both work. While a field is open, Tab moves to the next field and Shift+Tab moves back.
Two habits make the panel faster:
- Click and drag down across the X, Y, and Z fields to edit all three at once. Type one value and every selected field receives it.
- Hover over a field and press Ctrl+C, then hover over another and press Ctrl+V, to copy a value between fields. Ctrl+Alt+C and Ctrl+Alt+V copy and paste a whole row of three.
Adjusting after the fact
When you confirm a typed transform, Blender opens the Adjust Last Operation panel in the bottom-left corner of the viewport. It lists the values you typed, such as Move X, Y, Z, plus the constraint and orientation. You can change any of them and the object updates. This is the quickest way to fix a number you got wrong, provided you have not run another operation. Once you do, the panel is replaced.
Common errors
- Object goes the wrong way. You typed the number before choosing an axis, or the axis is in the wrong orientation. Press Esc and start again with the axis key.
- Rotation is far too small. You may have typed radians such as
1.57. Type90instead. - Scale does nothing. You typed
1, which is the identity. Type the factor you want, such as1.5. - Object vanished. You typed
S 0or the scale is zero. Press Ctrl+Z to undo. - Wrong total after repeating. G adds each time. Pressing
G X 3twice moves 6 units in total.
The same operations in Python
In Python, the data properties set absolute values, like the Transform panel. The operators are relative, like G, R, and S.
import bpy
import math
obj = bpy.context.active_object
# Absolute, like typing in the Transform panel
obj.location.x = 3.0
# Relative, like G X 3
obj.location.x += 3.0
# Relative rotation, like R Z 90 (the API takes radians)
obj.rotation_euler.z += math.radians(90)
# Relative scale, like S 2
obj.scale *= 2Only the first line of each pair matches a panel field. The += and *= lines match the keyboard shortcuts.
Exercise
An object sits at X = 2. You press G, X, type 3, and press Enter. Then you press N and type 3 into the X field of the Transform panel. Where does the object end up, and why?
Show answer
After the first move the object is at X = 5, because G adds the typed 3 to its current position of 2. Typing 3 into the panel's X field sets the position to exactly X = 3, because panel fields hold absolute values. The object ends at X = 3.
Exercise
You want to make an object three times as wide on X and leave Y and Z alone. Give two keystroke sequences that do it.
Show answer
Either press S, X, type 3, then Enter. Or press S, type 3, press Tab, type 1, press Tab, type 1, then Enter. The first constrains the scale to X. The second enters a separate factor for each axis.