Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_orientations.c
| Show First 20 Lines • Show All 470 Lines • ▼ Show 20 Lines | switch (orientation_type) { | ||||
| case V3D_ORIENT_GIMBAL: { | case V3D_ORIENT_GIMBAL: { | ||||
| if (gimbal_axis(ob, r_mat)) { | if (gimbal_axis(ob, r_mat)) { | ||||
| return V3D_ORIENT_GIMBAL; | return V3D_ORIENT_GIMBAL; | ||||
| } | } | ||||
| /* if not gimbal, fall through to normal */ | /* if not gimbal, fall through to normal */ | ||||
| ATTR_FALLTHROUGH; | ATTR_FALLTHROUGH; | ||||
| } | } | ||||
| case V3D_ORIENT_NORMAL: { | case V3D_ORIENT_NORMAL: { | ||||
| if (obedit || ob->mode & OB_MODE_POSE) { | if (obedit || (ob && (ob->mode & OB_MODE_POSE))) { | ||||
| ED_getTransformOrientationMatrix(C, r_mat, pivot_point); | ED_getTransformOrientationMatrix(C, r_mat, pivot_point); | ||||
| return V3D_ORIENT_NORMAL; | return V3D_ORIENT_NORMAL; | ||||
| } | } | ||||
| /* no break we define 'normal' as 'local' in Object mode */ | /* no break we define 'normal' as 'local' in Object mode */ | ||||
| ATTR_FALLTHROUGH; | ATTR_FALLTHROUGH; | ||||
| } | } | ||||
| case V3D_ORIENT_LOCAL: { | case V3D_ORIENT_LOCAL: { | ||||
| if (ob) { | if (ob) { | ||||
| ▲ Show 20 Lines • Show All 787 Lines • Show Last 20 Lines | |||||