Commit: c17cc4c0d8f2c91e5aa928c070c043e805d4f80e
Author: Campbell Barton
Date:   Wed Nov 21 08:08:53 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBc17cc4c0d8f2c91e5aa928c070c043e805d4f80e

Fix extrude tool redo

Redo operator properties weren't being set.

===================================================================

M       source/blender/editors/mesh/editmesh_extrude_gizmo.c

===================================================================

diff --git a/source/blender/editors/mesh/editmesh_extrude_gizmo.c 
b/source/blender/editors/mesh/editmesh_extrude_gizmo.c
index 5de8e896ddf..4b5f130b193 100644
--- a/source/blender/editors/mesh/editmesh_extrude_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_extrude_gizmo.c
@@ -278,6 +278,14 @@ static void gizmo_mesh_extrude_refresh(const bContext *C, 
wmGizmoGroup *gzgroup)
                if (redo.is_flip) {
                        negate_v3(ggd->adjust->matrix_basis[2]);
                }
+
+               /* Set redo properties. */
+               bool constraint[3] = {0, 0, 0};
+               constraint[ggd->adjust_axis] = true;
+               wmGizmoOpElem *gzop = WM_gizmo_operator_get(ggd->adjust, 0);
+               PointerRNA macroptr = RNA_pointer_get(&gzop->ptr, 
"TRANSFORM_OT_translate");
+               RNA_boolean_set_array(&macroptr, "constraint_axis", constraint);
+               RNA_float_set_array(&macroptr, "value", redo.value);
        }
 
        /* Location. */

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to