[Bf-blender-cvs] [5703efab886] master: Fix T94784: Crop node gizmo doesn't work

Sebastian Parborg noreply at git.blender.org
Fri Jan 14 17:44:38 CET 2022


Commit: 5703efab886dd612e6a52f9ac81e157db754b14f
Author: Sebastian Parborg
Date:   Fri Jan 14 17:42:28 2022 +0100
Branches: master
https://developer.blender.org/rB5703efab886dd612e6a52f9ac81e157db754b14f

Fix T94784: Crop node gizmo doesn't work

Fix refactoring mistake in rBcbca71a7cff3
Not the min and max values are initialized properly.

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

M	source/blender/editors/space_node/node_gizmo.cc

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

diff --git a/source/blender/editors/space_node/node_gizmo.cc b/source/blender/editors/space_node/node_gizmo.cc
index 41d13976209..4e5c5694aff 100644
--- a/source/blender/editors/space_node/node_gizmo.cc
+++ b/source/blender/editors/space_node/node_gizmo.cc
@@ -292,7 +292,11 @@ static void gizmo_node_crop_prop_matrix_set(const wmGizmo *gz,
   const bool ny = rct.ymin > rct.ymax;
   BLI_rctf_resize(&rct, fabsf(matrix[0][0]), fabsf(matrix[1][1]));
   BLI_rctf_recenter(&rct, (matrix[3][0] / dims[0]) + 0.5f, (matrix[3][1] / dims[1]) + 0.5f);
-  const rctf rct_isect{0, 0, 1, 1};
+  rctf rct_isect{};
+  rct_isect.xmin = 0;
+  rct_isect.xmax = 1;
+  rct_isect.ymin = 0;
+  rct_isect.ymax = 1;
   BLI_rctf_isect(&rct_isect, &rct, &rct);
   if (nx) {
     SWAP(float, rct.xmin, rct.xmax);



More information about the Bf-blender-cvs mailing list