Fix T76693: Inconsistent rotation Shortcut vs Gizmos

Problem introduced in rB4deea4f4c57a
This commit is contained in:
Germano Cavalcante 2020-05-12 14:35:16 -03:00
parent fc62a3366c
commit 94b9141c95
Notes: blender-bot 2023-02-14 00:06:52 +01:00
Referenced by issue #76693, Inconsistent rotation Shortcut vs Gizmos
1 changed files with 6 additions and 0 deletions

View File

@ -1668,7 +1668,13 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
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 (t->con.mode & CON_APPLY) {
orient_index = 1;
}
}
if (op && (prop = RNA_struct_find_property(op->ptr, "orient_axis_ortho"))) {
t->orient_axis_ortho = RNA_property_enum_get(op->ptr, prop);