Fix T76974: Shear Tool Misses Orientation

This commit is contained in:
Germano Cavalcante 2020-05-22 12:39:23 -03:00
parent c75a665c44
commit cbd4b8ebb0
Notes: blender-bot 2023-02-14 03:29:37 +01:00
Referenced by issue #76974, GPencil – Shear Tool Misses Orientation/Can't Shear Along X in Default Setup
1 changed files with 3 additions and 1 deletions

View File

@ -1660,9 +1660,11 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
short orient_types[3];
float custom_matrix[3][3];
bool use_orient_axis = false;
if (op && (prop = RNA_struct_find_property(op->ptr, "orient_axis"))) {
t->orient_axis = RNA_property_enum_get(op->ptr, prop);
use_orient_axis = true;
}
if (op && (prop = RNA_struct_find_property(op->ptr, "orient_axis_ortho"))) {
t->orient_axis_ortho = RNA_property_enum_get(op->ptr, prop);
@ -1683,7 +1685,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
orient_types[2] = orient_type_scene;
}
else {
if ((t->flag & T_MODAL) && transform_mode_is_changeable(t->mode)) {
if ((t->flag & T_MODAL) && (use_orient_axis || transform_mode_is_changeable(t->mode))) {
orient_types[0] = V3D_ORIENT_VIEW;
}
else {