Commit: 1b7ea80690747ccd7a3557cbb8defef1b15e3410
Author: YimingWu
Date:   Thu Jun 25 16:18:55 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB1b7ea80690747ccd7a3557cbb8defef1b15e3410

LANPR: Fix ambiguous occlusion level when having overlapping points on chaining 
.

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

M       source/blender/editors/lanpr/lanpr_chain.c

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

diff --git a/source/blender/editors/lanpr/lanpr_chain.c 
b/source/blender/editors/lanpr/lanpr_chain.c
index c1e19dce0a9..69c31930aea 100644
--- a/source/blender/editors/lanpr/lanpr_chain.c
+++ b/source/blender/editors/lanpr/lanpr_chain.c
@@ -132,7 +132,12 @@ static LANPR_RenderLineChainItem 
*lanpr_append_render_line_chain_point(LANPR_Ren
   LANPR_RenderLineChainItem *rlci;
 
   if (lanpr_check_point_overlapping(rlc->chain.last, x, y, 1e-5)) {
-    return rlc->chain.last;
+    /* Because segment type is determined by the leading chain point, so we 
need to ensure the type
+     * and occlusion is correct after omitting overlapping point*/
+    LANPR_RenderLineChainItem *old_rlci = rlc->chain.last;
+    old_rlci->line_type = type;
+    old_rlci->occlusion = level;
+    return old_rlci;
   }
 
   rlci = mem_static_aquire(&rb->render_data_pool, 
sizeof(LANPR_RenderLineChainItem));

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

Reply via email to