In edit mode with these settings:
- Face selection
- Pivot point: individual origins
- Transformation orientation: Normal
The faces don't rotate around the normals, is there another required setting that I overlooked?
You need to press a key to specify the axis. (i.e. X, Y or Z)
Setting the Transform orientation aligns the XYZ
coordinates to something, e.g.:
Global aligns the axes to the world
Local aligns the axes to the selected object(s) rotation
Normal aligns the axes to the selected element(s) normal
etc.
Note that pressing the axis key once always snaps to the Global orientation, regardless of the setting in 3D view > Header. To use the orientation specified in 3D view > Header, press the axis key twice. (e.g. GZZ)
With your settings, (Individual origins, Normal, Face) to rotate each face around its normal we should rotate around the Z
, see the wiki:
The z-axis of the manipulator will match the normal vector of the selected [element]
So by pressing RZZ:
Yes you can do this, all accessible from interface but included keys
#python to rotate all faces
#rotate all faces on mesh by 1 degree
import bpy, bmesh,math
from mathutils import Matrix
bm = bmesh.new()
bm.from_mesh(bpy.data.objects['Cube'].data)
for face in bm.faces:
axis = face.normal
rot = Matrix.Rotation(math.radians(1) , 4, axis)
cen = face.calc_center_bounds()
mat = bpy.data.objects['Cube'].matrix_basis
bmesh.ops.rotate(bm, cent=cen, matrix=rot, verts=face.verts,space = mat)
bm.to_mesh(bpy.data.objects['Cube'].data)
bm.free()