Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/object.py
| Show First 20 Lines • Show All 589 Lines • ▼ Show 20 Lines | def _main(context): | ||||
| offset = 0.5 * SCALE_FAC | offset = 0.5 * SCALE_FAC | ||||
| base_tri = (Vector((-offset, -offset, 0.0)), | base_tri = (Vector((-offset, -offset, 0.0)), | ||||
| Vector((+offset, -offset, 0.0)), | Vector((+offset, -offset, 0.0)), | ||||
| Vector((+offset, +offset, 0.0)), | Vector((+offset, +offset, 0.0)), | ||||
| Vector((-offset, +offset, 0.0)), | Vector((-offset, +offset, 0.0)), | ||||
| ) | ) | ||||
| def matrix_to_quad(matrix): | def matrix_to_quad(matrix): | ||||
| # scale = matrix.median_scale | # scale = matrix.mean_scale | ||||
| trans = matrix.to_translation() | trans = matrix.to_translation() | ||||
| rot = matrix.to_3x3() # also contains scale | rot = matrix.to_3x3() # also contains scale | ||||
| return [(rot * b) + trans for b in base_tri] | return [(rot * b) + trans for b in base_tri] | ||||
| scene = context.scene | scene = context.scene | ||||
| linked = {} | linked = {} | ||||
| for obj in context.selected_objects: | for obj in context.selected_objects: | ||||
| data = obj.data | data = obj.data | ||||
| ▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines | |||||