[Bf-blender-cvs] [d05e145c465] greasepencil-object: Remove check on back of camera

Antonio Vazquez noreply at git.blender.org
Tue May 16 20:33:15 CEST 2017


Commit: d05e145c4659c769e6d654918077b9fd53e17e5a
Author: Antonio Vazquez
Date:   Tue May 16 20:33:05 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBd05e145c4659c769e6d654918077b9fd53e17e5a

Remove check on back of camera

This check is getting weird result and create a segfault in the cache due changes in the index of the stroke depending of point of view.

Need to have a better implementation. We keep disabled while we found a better solution that not change the index of the strokes (maybe separate this check and add to cache_idx anyway)

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

M	source/blender/draw/engines/gpencil/gpencil_geom.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_geom.c b/source/blender/draw/engines/gpencil/gpencil_geom.c
index 8e6d39ab36a..a24fba092cd 100644
--- a/source/blender/draw/engines/gpencil/gpencil_geom.c
+++ b/source/blender/draw/engines/gpencil/gpencil_geom.c
@@ -356,7 +356,7 @@ Batch *DRW_gpencil_get_buffer_fill_geom(const tGPspoint *points, int totpoints,
 
 
 /* Helper for doing all the checks on whether a stroke can be drawn */
-bool gpencil_can_draw_stroke(RegionView3D *rv3d, const bGPDframe *gpf, const bGPDstroke *gps)
+bool gpencil_can_draw_stroke(RegionView3D *UNUSED(rv3d), const bGPDframe *UNUSED(gpf), const bGPDstroke *gps)
 {
 	/* skip stroke if it doesn't have any valid data */
 	if ((gps->points == NULL) || (gps->totpoints < 1))
@@ -370,6 +370,7 @@ bool gpencil_can_draw_stroke(RegionView3D *rv3d, const bGPDframe *gpf, const bGP
 		return false;
 	}
 
+#if 0
 	/* Check if stroke is in view plane, not on camera back. Only check first point of 
 	   the stroke because check all points is too work and it works fine in most situations
 	*/
@@ -386,6 +387,7 @@ bool gpencil_can_draw_stroke(RegionView3D *rv3d, const bGPDframe *gpf, const bGP
 	if (zdepth < 0.0) {
 		return false;
 	}
+#endif 
 
 	/* stroke can be drawn */
 	return true;




More information about the Bf-blender-cvs mailing list