[Bf-blender-cvs] [93850c74c1d] master: Fix add-object cursor plane failing to update on zoom
Campbell Barton
noreply at git.blender.org
Fri Nov 20 07:37:36 CET 2020
Commit: 93850c74c1dd277124a61b0b7d474eba8db00fdf
Author: Campbell Barton
Date: Fri Nov 20 17:32:09 2020 +1100
Branches: master
https://developer.blender.org/rB93850c74c1dd277124a61b0b7d474eba8db00fdf
Fix add-object cursor plane failing to update on zoom
Zoom with an orthographic view wasn't refreshing the preview plane.
===================================================================
M source/blender/editors/space_view3d/view3d_placement.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c
index b8512e42dcf..6d10aa5f957 100644
--- a/source/blender/editors/space_view3d/view3d_placement.c
+++ b/source/blender/editors/space_view3d/view3d_placement.c
@@ -1763,7 +1763,7 @@ struct PlacementCursor {
/* Check if we need to re-calculate the plane matrix. */
int mval_prev[2];
- float viewmat_prev[4][4];
+ float persmat_prev[4][4];
};
static void cursor_plane_draw(bContext *C, int x, int y, void *customdata)
@@ -1802,7 +1802,7 @@ static void cursor_plane_draw(bContext *C, int x, int y, void *customdata)
/* Update matrix? */
if ((plc->mval_prev[0] != mval[0]) || (plc->mval_prev[1] != mval[1]) ||
- !equals_m4m4(plc->viewmat_prev, rv3d->viewmat)) {
+ !equals_m4m4(plc->persmat_prev, rv3d->persmat)) {
plc->mval_prev[0] = mval[0];
plc->mval_prev[1] = mval[1];
@@ -1812,7 +1812,7 @@ static void cursor_plane_draw(bContext *C, int x, int y, void *customdata)
copy_m4_m3(plc->matrix, orient_matrix);
copy_v3_v3(plc->matrix[3], co);
- copy_m4_m4(plc->viewmat_prev, rv3d->viewmat);
+ copy_m4_m4(plc->persmat_prev, rv3d->persmat);
}
/* Draw */
More information about the Bf-blender-cvs
mailing list