Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_generics.c
| Show First 20 Lines • Show All 1,229 Lines • ▼ Show 20 Lines | if (t->spacetype == SPACE_VIEW3D) { | ||||
| t->around = v3d->around; | t->around = v3d->around; | ||||
| /* bend always uses the cursor */ | /* bend always uses the cursor */ | ||||
| if (t->mode == TFM_BEND) { | if (t->mode == TFM_BEND) { | ||||
| t->around = V3D_AROUND_CURSOR; | t->around = V3D_AROUND_CURSOR; | ||||
| } | } | ||||
| t->current_orientation = v3d->twmode; | t->current_orientation = v3d->twmode; | ||||
| // when v3d->twmode is multi, set the current values for the translate/scale/rotation | |||||
| if (v3d->twmode == V3D_MANIP_MULTI_TRANSF) { | |||||
| t->current_translation = v3d->twtrans; | |||||
| t->current_rotation = v3d->twrots; | |||||
| t->current_scale = v3d->twscale; | |||||
| } | |||||
| /* exceptional case */ | /* exceptional case */ | ||||
| if (t->around == V3D_AROUND_LOCAL_ORIGINS) { | if (t->around == V3D_AROUND_LOCAL_ORIGINS) { | ||||
| if (ELEM(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL)) { | if (ELEM(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL)) { | ||||
| const bool use_island = transdata_check_local_islands(t, t->around); | const bool use_island = transdata_check_local_islands(t, t->around); | ||||
| if (obedit && !use_island) { | if (obedit && !use_island) { | ||||
| t->options |= CTX_NO_PET; | t->options |= CTX_NO_PET; | ||||
| ▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | else { | ||||
| t->around = V3D_AROUND_CENTER_BOUNDS; | t->around = V3D_AROUND_CENTER_BOUNDS; | ||||
| } | } | ||||
| if (op && ((prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) && | if (op && ((prop = RNA_struct_find_property(op->ptr, "constraint_orientation")) && | ||||
| RNA_property_is_set(op->ptr, prop))) | RNA_property_is_set(op->ptr, prop))) | ||||
| { | { | ||||
| t->current_orientation = RNA_property_enum_get(op->ptr, prop); | t->current_orientation = RNA_property_enum_get(op->ptr, prop); | ||||
| if (t->current_orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C)) { | if (t->current_orientation >= V3D_MANIP_MULTI_TRANSF + BIF_countTransformOrientation(C)) { | ||||
| View3D *v3d = sa->spacedata.first; | |||||
| if (t->current_orientation == V3D_MANIP_MULTI_TRANSF) { | |||||
| t->current_translation = v3d->twtrans; | |||||
| t->current_rotation = v3d->twrots; | |||||
| t->current_scale = v3d->twscale; | |||||
| } | |||||
| else { | |||||
| t->current_orientation = V3D_MANIP_GLOBAL; | t->current_orientation = V3D_MANIP_GLOBAL; | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| if (op && ((prop = RNA_struct_find_property(op->ptr, "release_confirm")) && | if (op && ((prop = RNA_struct_find_property(op->ptr, "release_confirm")) && | ||||
| RNA_property_is_set(op->ptr, prop))) | RNA_property_is_set(op->ptr, prop))) | ||||
| { | { | ||||
| if (RNA_property_boolean_get(op->ptr, prop)) { | if (RNA_property_boolean_get(op->ptr, prop)) { | ||||
| t->flag |= T_RELEASE_CONFIRM; | t->flag |= T_RELEASE_CONFIRM; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 804 Lines • Show Last 20 Lines | |||||