Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_mode.c
| Show First 20 Lines • Show All 1,079 Lines • ▼ Show 20 Lines | case TFM_TRANSLATION: | ||||
| initTranslation(t); | initTranslation(t); | ||||
| break; | break; | ||||
| case TFM_ROTATION: | case TFM_ROTATION: | ||||
| initRotation(t); | initRotation(t); | ||||
| break; | break; | ||||
| case TFM_RESIZE: { | case TFM_RESIZE: { | ||||
| float mouse_dir_constraint[3]; | float mouse_dir_constraint[3]; | ||||
| if (op) { | if (op) { | ||||
| RNA_float_get_array(op->ptr, "mouse_dir_constraint", mouse_dir_constraint); | PropertyRNA *prop = RNA_struct_find_property(op->ptr, "mouse_dir_constraint"); | ||||
| if (prop) { | |||||
| RNA_property_float_get_array(op->ptr, prop, mouse_dir_constraint); | |||||
| } | |||||
| else { | |||||
| /* Resize is expected to have this property. */ | |||||
| BLI_assert(!STREQ(op->idname, "TRANSFORM_OT_resize")); | |||||
| } | |||||
| } | } | ||||
| else { | else { | ||||
| zero_v3(mouse_dir_constraint); | zero_v3(mouse_dir_constraint); | ||||
| } | } | ||||
| initResize(t, mouse_dir_constraint); | initResize(t, mouse_dir_constraint); | ||||
| break; | break; | ||||
| } | } | ||||
| case TFM_SKIN_RESIZE: | case TFM_SKIN_RESIZE: | ||||
| ▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines | |||||