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:
authorBastien Montagne <montagne29@wanadoo.fr>2012-11-11 18:48:58 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-11-11 18:48:58 +0400
commit35dff426e93f58fff59691f919b16836ab3340e1 (patch)
tree16e938d43a635be4db10fe11f77b446a8cb1d227 /source/blender/makesdna/DNA_gpencil_types.h
parent56cee8165639356df0f87a5e31adafbec7a80ed5 (diff)
"Dynamic Sketch" patch, which adds timing data to GP strokes, by storing an inittime in each stroke (value returned by PIL_check_seconds_timer() func), and then a delta time for each of its points, relative to that inittime.
These timing data can then be used during conversion to Curve objects, to create a path animation (i.e. an Evaluation Time F-Curve) exactly reproducing the drawing movements. Aside from this "main feature", the patch brings several fixes/enhancements: * Stroke smoothing/simplifying will no more move the start/end points of a stroke (this was rather annoying sometimes!). * Also optimized smoothing code (even though not really noticeable on a modern computer, it now uses less memory and runs faster). * When converting to curve, you now have the following new possibilities: ** Normalize the weight values (currently, they will get "stroke width * 0.1", i.e. would range by default from 0.0 to 0.3...). ** Scale the radius values to your liking (again, currently they are set from stroke width times 0.1)! ** Link all strokes into a single curve, using zero-radius sections (this is mandatory to use the dynamic feature!). Here is a small demo video: http://youtu.be/VwWEXrnQAFI Will update user manual later today.
Diffstat (limited to 'source/blender/makesdna/DNA_gpencil_types.h')
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 100968e7257..b7c1ee675b3 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -41,6 +41,7 @@
typedef struct bGPDspoint {
float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */
float pressure; /* pressure of input device (from 0 to 1) at this point */
+ float time; /* seconds since start of stroke */
} bGPDspoint;
/* Grease-Pencil Annotations - 'Stroke'
@@ -55,6 +56,7 @@ typedef struct bGPDstroke {
short thickness; /* thickness of stroke (currently not used) */
short flag; /* various settings about this stroke */
+ double inittime; /* Init time of stroke */
} bGPDstroke;
/* bGPDstroke->flag */