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:
authorJoshua Leung <aligorith@gmail.com>2008-07-30 13:07:56 +0400
committerJoshua Leung <aligorith@gmail.com>2008-07-30 13:07:56 +0400
commit7b819bc6316ac32c60dd6a0e404bc9e2a781feba (patch)
tree9187e35fb7d1c8ffca33dbb543706ced9712b8a7 /source/blender/include/BDR_gpencil.h
parent34bb44673469dc50e980dec86b5892789449b378 (diff)
== 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
Diffstat (limited to 'source/blender/include/BDR_gpencil.h')
-rw-r--r--source/blender/include/BDR_gpencil.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/include/BDR_gpencil.h b/source/blender/include/BDR_gpencil.h
index d2fc7be29ea..eb749cf28ec 100644
--- a/source/blender/include/BDR_gpencil.h
+++ b/source/blender/include/BDR_gpencil.h
@@ -38,6 +38,15 @@ struct bGPdata;
struct bGPDlayer;
struct bGPDframe;
+/* ------------- Grease-Pencil Helpers -------------- */
+
+/* Temporary 'Stroke Point' data */
+typedef struct tGPspoint {
+ short x, y; /* x and y coordinates of cursor (in relative to area) */
+ float xf, yf; /* same as x and y, but as floats */
+ float pressure; /* pressure of tablet at this point */
+} tGPspoint;
+
/* ------------ Grease-Pencil API ------------------ */
void free_gpencil_strokes(struct bGPDframe *gpf);