Commit: d8fcd8a3162faf9c0ad4c4eaf51bd43bc92f5789
Author: Pablo Dobarro
Date:   Wed Oct 7 23:43:40 2020 +0200
Branches: master
https://developer.blender.org/rBd8fcd8a3162faf9c0ad4c4eaf51bd43bc92f5789

Fix sculpt raycast function returning wrong value

When sampled normals were disabled SCULPT_cursor_geometry_info_update
was returning false instead of the value from the raycast data.

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

M       source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c 
b/source/blender/editors/sculpt_paint/sculpt.c
index 2bc19b625cd..1a2848f1b38 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7162,7 +7162,7 @@ bool SCULPT_cursor_geometry_info_update(bContext *C,
       mat[3][3];
   float viewDir[3] = {0.0f, 0.0f, 1.0f};
   int totnode;
-  bool original = false, hit = false;
+  bool original = false;
 
   ED_view3d_viewcontext_init(C, &vc, depsgraph);
 
@@ -7227,7 +7227,7 @@ bool SCULPT_cursor_geometry_info_update(bContext *C,
   /* Option to return the face normal directly for performance o accuracy 
reasons. */
   if (!use_sampled_normal) {
     copy_v3_v3(out->normal, srd.face_normal);
-    return hit;
+    return srd.hit;
   }
 
   /* Sampled normal calculation. */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to