Sub topic 3
Setting Values in the Transform Panel
This chapter assumes you know Object Mode, selecting objects, and the G, R, and S shortcuts. You should also be comfortable with the X, Y, and Z axes in the viewport.
Setting values in the Transform panel
Press N in the 3D viewport to open the sidebar, then open the Item tab. The Transform panel shows the location, rotation, and scale of the active object. Type a number into any field and press Enter. The panel shows rotation in degrees, while Python uses radians.
Choosing a pivot point
A pivot point is the center that rotation and scaling use. Set it from the Pivot Point dropdown in the 3D viewport header.
| Pivot | Effect |
|---|---|
| Median Point | Uses the average center of all selected objects |
| Individual Origins | Each object transforms around its own origin |
| 3D Cursor | Uses the position of the 3D cursor |
Global, Local, and View orientations
The Transform Orientation dropdown sets which axes G, R, and S follow.
- Global uses the scene axes.
- Local uses the object's own axes, so a rotated cube moves along its faces.
- View uses the direction the viewport is facing.
Snapping to increments and scene elements
Toggle snapping with the magnet icon in the header or with Shift+Tab. Hold Ctrl during a transform to snap for that one move. Choose what to snap to, such as increments or vertices, from the snap menu.
Proportional editing
Press O to turn on proportional editing. Nearby vertices move with a smooth falloff. This works best in Edit Mode, where you can shape a mesh.
Clearing location, rotation, and scale
Alt+G clears location, Alt+R clears rotation, and Alt+S clears scale. Clearing resets the values in the Transform panel without changing the mesh.
Object origin and applying transforms
The origin is the small dot that marks an object's local center. Set it with Object > Set Origin. Ctrl+A opens the Apply menu, which bakes the transform into the mesh data and resets those values.
Transforming objects with Python
import bpy
import math
obj = bpy.context.active_object
print(obj.name, obj.location, obj.rotation_euler, obj.scale)
obj.location = (1.0, 2.0, 0.5)
obj.rotation_euler = (0.0, 0.0, math.radians(45))
obj.scale = (2.0, 2.0, 2.0)
bpy.ops.object.transform_apply(location=False, rotation=True, scale=True)Exercise
The Transform panel shows a rotation of 90 degrees around Z. Which Python line sets the same rotation?
Show answer
obj.rotation_euler = (0.0, 0.0, math.radians(90)). The Python API takes radians, so the value must be converted.