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.
This commit is contained in:
Pablo Dobarro
2020-10-07 23:43:40 +02:00
parent c4a281e801
commit d8fcd8a316

View File

@@ -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. */