From 1bfbfa281046b9d600a1604794fce3aadd7f5cf7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Feb 2019 21:52:56 +1100 Subject: Transform: remove constraints from the redo panel Constraint options had confusing behavior: - When non were pressed, the orientation was ignored. - When any were pressed, the orientation was used, but only unconstrained axed could be adjusted. Now constraining is only used for modal execution so there is no need to show these in the interface. When an orientation is selected, the XYZ values always transform using that space. Note, transform system should be refactored to support different orientations w/o having to use constraints. Addresses T57204 --- source/blender/editors/transform/transform_gizmo_extrude_3d.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/transform/transform_gizmo_extrude_3d.c') diff --git a/source/blender/editors/transform/transform_gizmo_extrude_3d.c b/source/blender/editors/transform/transform_gizmo_extrude_3d.c index d6c8f01edf1..f6d1b91c284 100644 --- a/source/blender/editors/transform/transform_gizmo_extrude_3d.c +++ b/source/blender/editors/transform/transform_gizmo_extrude_3d.c @@ -389,8 +389,9 @@ static void gizmo_mesh_extrude_invoke_prepare(const bContext *UNUSED(C), wmGizmo wmGizmoOpElem *gzop = WM_gizmo_operator_get(gz, 0); PointerRNA macroptr = RNA_pointer_get(&gzop->ptr, "TRANSFORM_OT_translate"); if (gz == ggd->adjust[0]) { - RNA_float_set_array(¯optr, "constraint_matrix", &ggd->redo_xform.constraint_matrix[0][0]); RNA_boolean_set_array(¯optr, "constraint_axis", ggd->redo_xform.constraint_axis); + RNA_float_set_array(¯optr, "constraint_matrix", &ggd->redo_xform.constraint_matrix[0][0]); + RNA_enum_set(¯optr, "constraint_orientation", V3D_ORIENT_NORMAL); } RNA_float_set_array(¯optr, "value", ggd->redo_xform.value); } @@ -409,6 +410,7 @@ static void gizmo_mesh_extrude_invoke_prepare(const bContext *UNUSED(C), wmGizmo wmGizmoOpElem *gzop = WM_gizmo_operator_get(gz, 0); PointerRNA macroptr = RNA_pointer_get(&gzop->ptr, "TRANSFORM_OT_translate"); RNA_float_set_array(¯optr, "constraint_matrix", &ggd->data.normal_mat3[0][0]); + RNA_enum_set(¯optr, "constraint_orientation", V3D_ORIENT_NORMAL); } } } -- cgit v1.2.3