Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_transform.c
| Context not available. | |||||
| GEOMETRY_TO_ORIGIN = 0, | GEOMETRY_TO_ORIGIN = 0, | ||||
| ORIGIN_TO_GEOMETRY, | ORIGIN_TO_GEOMETRY, | ||||
| ORIGIN_TO_CURSOR, | ORIGIN_TO_CURSOR, | ||||
| ORIGIN_TO_CENTER_OF_AREA, | |||||
| ORIGIN_TO_CENTER_OF_MASS | ORIGIN_TO_CENTER_OF_MASS | ||||
| }; | }; | ||||
| Context not available. | |||||
| Mesh *me = ob->data; | Mesh *me = ob->data; | ||||
| if (centermode == ORIGIN_TO_CURSOR) { /* done */ } | if (centermode == ORIGIN_TO_CURSOR) { /* done */ } | ||||
| else if (centermode == ORIGIN_TO_CENTER_OF_MASS) { BKE_mesh_center_centroid(me, cent); } | else if (centermode == ORIGIN_TO_CENTER_OF_AREA) { BKE_mesh_center_centroid(me, cent); } | ||||
| else if (centermode == ORIGIN_TO_CENTER_OF_MASS) { BKE_mesh_center_solid_centroid(me, cent); } | |||||
| else if (around == V3D_AROUND_CENTER_MEAN) { BKE_mesh_center_median(me, cent); } | else if (around == V3D_AROUND_CENTER_MEAN) { BKE_mesh_center_median(me, cent); } | ||||
| else { BKE_mesh_center_bounds(me, cent); } | else { BKE_mesh_center_bounds(me, cent); } | ||||
| Context not available. | |||||
| "Move object origin to center of object geometry"}, | "Move object origin to center of object geometry"}, | ||||
| {ORIGIN_TO_CURSOR, "ORIGIN_CURSOR", 0, "Origin to 3D Cursor", | {ORIGIN_TO_CURSOR, "ORIGIN_CURSOR", 0, "Origin to 3D Cursor", | ||||
| "Move object origin to position of the 3D cursor"}, | "Move object origin to position of the 3D cursor"}, | ||||
| {ORIGIN_TO_CENTER_OF_AREA, "ORIGIN_CENTER_OF_AREA", 0, "Origin to Center of Area", | |||||
| "Move object origin to the object center of area (mass for thin shells, assuming uniform density)"}, | |||||
| {ORIGIN_TO_CENTER_OF_MASS, "ORIGIN_CENTER_OF_MASS", 0, "Origin to Center of Mass", | {ORIGIN_TO_CENTER_OF_MASS, "ORIGIN_CENTER_OF_MASS", 0, "Origin to Center of Mass", | ||||
| "Move object origin to the object center of mass (assuming uniform density)"}, | "Move object origin to the object center of mass (assuming uniform density)"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| Context not available. | |||||