diff options
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index b1e69dde0ac..6de962a3ed1 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -174,9 +174,6 @@ static void clipMirrorModifier(TransInfo *t) int clip; float loc[3], iloc[3]; - if (td->flag & TD_NOACTION) { - break; - } if (td->loc == NULL) { break; } @@ -1068,11 +1065,6 @@ static void recalcData_objects(TransInfo *t) for (int i = 0; i < tc->data_len; i++, td++) { Object *ob = td->ob; - - if (td->flag & TD_NOACTION) { - break; - } - if (td->flag & TD_SKIP) { continue; } @@ -1379,6 +1371,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve bGPdata *gpd = CTX_data_gpencil_data(C); PropertyRNA *prop; + t->mbus = CTX_wm_message_bus(C); t->depsgraph = CTX_data_depsgraph_pointer(C); t->scene = sce; t->view_layer = view_layer; @@ -1649,13 +1642,17 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve } { - TransformOrientationSlot *orient_slot = &t->scene->orientation_slots[SCE_ORIENT_DEFAULT]; short orient_type_set = -1; short orient_type_matrix_set = -1; - short orient_type_scene = orient_slot->type; - if (orient_type_scene == V3D_ORIENT_CUSTOM) { - const int index_custom = orient_slot->index_custom; - orient_type_scene += index_custom; + short orient_type_scene = V3D_ORIENT_GLOBAL; + + if ((t->spacetype == SPACE_VIEW3D) && (t->region->regiontype == RGN_TYPE_WINDOW)) { + TransformOrientationSlot *orient_slot = &t->scene->orientation_slots[SCE_ORIENT_DEFAULT]; + orient_type_scene = orient_slot->type; + if (orient_type_scene == V3D_ORIENT_CUSTOM) { + const int index_custom = orient_slot->index_custom; + orient_type_scene += index_custom; + } } short orient_types[3]; @@ -1929,7 +1926,7 @@ void postTrans(bContext *C, TransInfo *t) ED_region_draw_cb_exit(t->region->type, t->draw_handle_pixel); } if (t->draw_handle_cursor) { - WM_paint_cursor_end(CTX_wm_manager(C), t->draw_handle_cursor); + WM_paint_cursor_end(t->draw_handle_cursor); } if (t->flag & T_MODAL_CURSOR_SET) { @@ -2408,19 +2405,11 @@ void calculatePropRatio(TransInfo *t) } else if ((connected && (td->flag & TD_NOTCONNECTED || td->dist > t->prop_size)) || (connected == 0 && td->rdist > t->prop_size)) { - /* - * The elements are sorted according to their dist member in the array, - * that means we can stop when it finds one element outside of the propsize. - * do not set 'td->flag |= TD_NOACTION', the prop circle is being changed. - */ - td->factor = 0.0f; restoreElement(td); } else { /* Use rdist for falloff calculations, it is the real distance */ - td->flag &= ~TD_NOACTION; - if (connected) { dist = (t->prop_size - td->dist) / t->prop_size; } |