Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-10-15 09:23:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-10-15 09:23:23 +0300
commit0500dcd711d1894ccab5769c6addf91e6d4e30df (patch)
treeadc94b395d18a863c93a8b193b1418f27bcce579 /source/blender
parent4fcdcbe38d2e7ce170d951e37c24b60e202919c4 (diff)
Fix scan-fill normal flipping for displist & mask filling
Missed from fix for T70594 which reversed the normals, Resolves T70809
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/displist.c8
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index cbd3c91acc7..46f6a604eaa 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -624,7 +624,7 @@ void BKE_displist_fill(ListBase *dispbase,
static void bevels_to_filledpoly(Curve *cu, ListBase *dispbase)
{
- const float z_up[3] = {0.0f, 0.0f, 1.0f};
+ const float z_up[3] = {0.0f, 0.0f, -1.0f};
ListBase front, back;
DispList *dl, *dlnew;
float *fp, *fp1;
@@ -703,7 +703,7 @@ static void curve_to_filledpoly(Curve *cu, ListBase *UNUSED(nurb), ListBase *dis
bevels_to_filledpoly(cu, dispbase);
}
else {
- const float z_up[3] = {0.0f, 0.0f, 1.0f};
+ const float z_up[3] = {0.0f, 0.0f, -1.0f};
BKE_displist_fill(dispbase, dispbase, z_up, false);
}
}
@@ -1730,11 +1730,11 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
if (cu->bevobj && (cu->flag & CU_FILL_CAPS) && !(nu->flagu & CU_NURB_CYCLIC)) {
if (a == 1) {
fillBevelCap(nu, dlb, cur_data - 3 * dlb->nr, &bottom_capbase);
- negate_v3_v3(bottom_no, bevp->dir);
+ copy_v3_v3(bottom_no, bevp->dir);
}
if (a == steps - 1) {
fillBevelCap(nu, dlb, cur_data, &top_capbase);
- copy_v3_v3(top_no, bevp->dir);
+ negate_v3_v3(top_no, bevp->dir);
}
}
}
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index e03903c05e4..e6cfea6fb03 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -589,7 +589,7 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle,
(do_aspect_correct && width > height) ? (float)height / (float)width : 1.0f,
(do_aspect_correct && width < height) ? (float)width / (float)height : 1.0f};
- const float zvec[3] = {0.0f, 0.0f, 1.0f};
+ const float zvec[3] = {0.0f, 0.0f, -1.0f};
MaskLayer *masklay;
unsigned int masklay_index;
MemArena *sf_arena;