Fix T76919: Wrong orientation when changing translate to rotate

During the refactor of the transform operations, in an attempt to
maintain previous behavior, the default orientation of the translate
and resize operations became `Global` and the rotate operation became
`View`.

Now the default is always `View`, and on redo, the translate and rotate
operations are saved as `Global`.
This commit is contained in:
2020-05-20 16:22:10 -03:00
parent 29afadcb15
commit 600fd1c6f0
4 changed files with 31 additions and 22 deletions

View File

@@ -1660,15 +1660,11 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
orient_type_scene += index_custom;
}
short orient_type_default = V3D_ORIENT_GLOBAL;
short orient_type_default = V3D_ORIENT_VIEW;
short orient_type_constraint[2];
if (op && (prop = RNA_struct_find_property(op->ptr, "orient_axis"))) {
t->orient_axis = RNA_property_enum_get(op->ptr, prop);
/* For transfor modes that require "orient_axis" use
* `V3D_ORIENT_VIEW` as default. */
orient_type_default = V3D_ORIENT_VIEW;
}
if (op && (prop = RNA_struct_find_property(op->ptr, "orient_axis_ortho"))) {
t->orient_axis_ortho = RNA_property_enum_get(op->ptr, prop);