Commit: 7f2a7d97d64947ee320e07f28d08490ff9de321c
Author: Lukas Tönne
Date:   Mon Jan 8 10:57:10 2018 +0000
Branches: hair_guides
https://developer.blender.org/rB7f2a7d97d64947ee320e07f28d08490ff9de321c

Add back section edges drawing.

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

M       source/blender/draw/intern/draw_cache_impl_groom.c

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

diff --git a/source/blender/draw/intern/draw_cache_impl_groom.c 
b/source/blender/draw/intern/draw_cache_impl_groom.c
index c451405e92c..b684dc97950 100644
--- a/source/blender/draw/intern/draw_cache_impl_groom.c
+++ b/source/blender/draw/intern/draw_cache_impl_groom.c
@@ -459,6 +459,8 @@ static void groom_get_edges(
                        {
                                if (use_curve_cache)
                                {
+                                       const int curvesize = bundle->curvesize;
+                                       
                                        /* a curve for each shape vertex */
                                        for (int i = 0; i < numshapeverts; ++i)
                                        {
@@ -471,19 +473,18 @@ static void groom_get_edges(
                                                                    idx0 + 
(j+1));
                                                }
                                        }
-#if 0
+                                       
                                        /* a loop for each section */
                                        for (int i = 0; i < 
bundle->totsections; ++i)
                                        {
-                                               uint idx0 = idx + i * curve_res 
* numshapeverts;
+                                               uint idx0 = idx + i * curve_res;
                                                for (int j = 0; j < 
numshapeverts - 1; ++j)
                                                {
-                                                       
GWN_indexbuf_add_line_verts(&elb, idx0 + j, idx0 + j + 1);
+                                                       
GWN_indexbuf_add_line_verts(&elb, idx0 + j * curvesize, idx0 + (j + 1) * 
curvesize);
                                                }
                                                // close the loop
-                                               
GWN_indexbuf_add_line_verts(&elb, idx0 + (numshapeverts-1), idx0);
+                                               
GWN_indexbuf_add_line_verts(&elb, idx0 + (numshapeverts-1) * curvesize, idx0);
                                        }
-#endif
                                        
                                        idx += bundle->curvesize * 
bundle->numshapeverts;
                                }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to