Gpencil - Fix stroke normal from D10171

In my previous patch https://developer.blender.org/D10171 some code changing the direction the strokes normal was accidentally included. This patch reverts that back to the original normal calculation.

Reviewed By: #grease_pencil, antoniov

Differential Revision: https://developer.blender.org/D11148
This commit is contained in:
Cody Winchester 2021-05-04 16:30:37 +02:00 committed by Antonio Vazquez
parent d2311de218
commit 7904899d02
1 changed files with 1 additions and 3 deletions

View File

@ -1688,7 +1688,6 @@ void BKE_gpencil_stroke_normal(const bGPDstroke *gps, float r_normal[3])
float vec1[3];
float vec2[3];
float vec3[3];
/* initial vector (p0 -> p1) */
sub_v3_v3v3(vec1, &pt1->x, &pt0->x);
@ -1697,8 +1696,7 @@ void BKE_gpencil_stroke_normal(const bGPDstroke *gps, float r_normal[3])
sub_v3_v3v3(vec2, &pt3->x, &pt0->x);
/* vector orthogonal to polygon plane */
cross_v3_v3v3(vec3, vec1, vec2);
cross_v3_v3v3(r_normal, vec1, vec3);
cross_v3_v3v3(r_normal, vec1, vec2);
/* Normalize vector */
normalize_v3(r_normal);