From 7b819bc6316ac32c60dd6a0e404bc9e2a781feba Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 30 Jul 2008 09:07:56 +0000 Subject: == Grease Pencil - Eraser (First Draft) == This commit introduces the ability to erase strokes. Admittedly, the code for this is not totally stable yet, and doesn't always produce optimum results. I'm committing now for backup purposes. It currently uses the lasso code to check whether segments of the strokes (a segment occurs between two recorded points) occur inside a region defined by the 'eraser' stroke, or any intersections it makes with the 'eraser' stroke. There are multiple ways to erase strokes: * With 'Draw Mode' on, use RMB-drag to erase * With a tablet, use the 'eraser' end of the stylus * Hold the Alt Key, and use the 'selection' mouse-button (i.e. LMB if mouse-button swapping is on, RMB otherwise) to erase. For this one, this is necessary to avoid overriding the view-rotation hotkey combo for 2-button mice! Todo: * 3d-strokes are not correctly mapped back to screen-space for sampling yet * Drawing of eraser strokes is still not distinctive enough * After running a few times, may cause stack corruption/segfaults, so be careful! == Bugfixes == * Grease-Pencil Onion-Skinning works again. Onionskining was being supplied the wrong frames, and the alpha factor was still the old one used for 0-255 ranged colour values --- source/blender/makesdna/DNA_gpencil_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_gpencil_types.h') diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index b88dd698c3f..dca4e28688d 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -125,7 +125,7 @@ typedef struct bGPdata { */ short sbuffer_size; /* number of elements currently in cache */ short sbuffer_sflag; /* flags for stroke that cache represents */ - bGPDspoint *sbuffer; /* stroke buffer (can hold GP_STROKE_BUFFER_MAX) */ + void *sbuffer; /* stroke buffer (can hold GP_STROKE_BUFFER_MAX) */ } bGPdata; /* bGPdata->flag */ -- cgit v1.2.3