diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2022-01-18 22:07:08 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-01-18 22:21:48 +0300 |
commit | 9506dcf6758b4df7b01700c3f9cc61d05d93b50e (patch) | |
tree | d2a34495ffa7b37564e99badf52f4362e520697c /source | |
parent | 977baeaa261b1c17306fc381df158d07492688bf (diff) |
Fix T95029: Arrow gizmo always uses normal direction
Bug possibly introduced in {rBc57e4418bb85aec8bd3615fd775b990badb43d30}.
Interestingly, the orientation set before (NORMAL), even different from
the orientation that was actually used, was allowing the use of
"orient_matrix" ("orient_matrix_type" should have been NORMAL in that
case too).
In any case, make sure the "orient_matrix_type" and "orient_type" are the
same so that the "orient_matrix" is used.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform_gizmo_extrude_3d.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_gizmo_extrude_3d.c b/source/blender/editors/transform/transform_gizmo_extrude_3d.c index 6e89c3de197..dee6e7281ef 100644 --- a/source/blender/editors/transform/transform_gizmo_extrude_3d.c +++ b/source/blender/editors/transform/transform_gizmo_extrude_3d.c @@ -82,6 +82,7 @@ typedef struct GizmoExtrudeGroup { float orient_matrix[3][3]; bool constraint_axis[3]; float value[4]; + int orient_type; } redo_xform; /* Depends on object type. */ @@ -310,6 +311,7 @@ static void gizmo_mesh_extrude_refresh(const bContext *C, wmGizmoGroup *gzgroup) RNA_float_get_array(op_xform->ptr, "orient_matrix", &ggd->redo_xform.orient_matrix[0][0]); RNA_boolean_get_array(op_xform->ptr, "constraint_axis", ggd->redo_xform.constraint_axis); RNA_float_get_array(op_xform->ptr, "value", ggd->redo_xform.value); + ggd->redo_xform.orient_type = RNA_enum_get(op_xform->ptr, "orient_type"); /* Set properties for redo. */ for (int i = 0; i < 3; i++) { @@ -435,7 +437,8 @@ static void gizmo_mesh_extrude_invoke_prepare(const bContext *UNUSED(C), if (gz == ggd->adjust[0]) { RNA_boolean_set_array(¯optr, "constraint_axis", ggd->redo_xform.constraint_axis); RNA_float_set_array(¯optr, "orient_matrix", &ggd->redo_xform.orient_matrix[0][0]); - RNA_enum_set(¯optr, "orient_type", V3D_ORIENT_NORMAL); + RNA_enum_set(¯optr, "orient_matrix_type", ggd->redo_xform.orient_type); + RNA_enum_set(¯optr, "orient_type", ggd->redo_xform.orient_type); } RNA_float_set_array(¯optr, "value", ggd->redo_xform.value); } |