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:
authorAntonio Vazquez <blendergit@gmail.com>2020-05-07 16:02:21 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-05-07 16:11:16 +0300
commitb571516237a94e944b9182d233b9ba64819d92c4 (patch)
tree89a3b9446acc83730cd81886d44b16f0fdadbe1e /source/blender/editors/include
parent9b7754883b3d41d41cd2df3b079cc1fce78c044a (diff)
GPencil: Include new Brush random curves
Now the brushes have several new random settings and use curves to define the effect. The curves have been moved below the parameter to keep UI standards and extra curve panels have been removed. {F8505387} The new curves are: * Hue. * Saturation. * Value. New option to random at stroke level instead to random at point level for the following values: * Thickness. * Strength. * UV. * Hue. * Saturation. * Value. Curves have been moved below the corresponding parameter and only are displayed in properties panel. Display the curves in the popover made it unusable. {F8505392} Also, the Pressure random has been renamed to Radius because the old name was not clear enough. Reviewed By: mendio, pablovazquez Differential Revision: https://developer.blender.org/D7577
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_gpencil.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 1403ae1f3cc..2dbd979564e 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -40,6 +40,7 @@ struct bGPDspoint;
struct bGPDstroke;
struct bGPdata;
struct tGPspoint;
+struct GpRandomSettings;
struct ARegion;
struct Depsgraph;
@@ -48,6 +49,7 @@ struct RegionView3D;
struct ReportList;
struct Scene;
struct ScrArea;
+struct SnapObjectContext;
struct ToolSettings;
struct View3D;
struct ViewLayer;
@@ -69,14 +71,15 @@ struct wmOperator;
* Used as part of the 'stroke cache' used during drawing of new strokes
*/
typedef struct tGPspoint {
- float x, y; /* x and y coordinates of cursor (in relative to area) */
- float pressure; /* pressure of tablet at this point */
- float strength; /* pressure of tablet at this point for alpha factor */
- float time; /* Time relative to stroke start (used when converting to path) */
- float uv_fac; /* factor of uv along the stroke */
- float uv_rot; /* uv rotation for dor mode */
- float rnd[3]; /* rnd value */
- bool rnd_dirty; /* rnd flag */
+ float x, y; /* x and y coordinates of cursor (in relative to area) */
+ float pressure; /* pressure of tablet at this point */
+ float strength; /* pressure of tablet at this point for alpha factor */
+ float time; /* Time relative to stroke start (used when converting to path) */
+ float uv_fac; /* factor of uv along the stroke */
+ float uv_rot; /* uv rotation for dor mode */
+ float rnd[3]; /* rnd value */
+ bool rnd_dirty; /* rnd flag */
+ float vert_color[4]; /* Point vertex color. */
} tGPspoint;
/* ----------- Grease Pencil Tools/Context ------------- */
@@ -296,12 +299,18 @@ void ED_gpencil_fill_vertex_color_set(struct ToolSettings *ts,
struct bGPDstroke *gps);
void ED_gpencil_point_vertex_color_set(struct ToolSettings *ts,
struct Brush *brush,
- struct bGPDspoint *pt);
+ struct bGPDspoint *pt,
+ struct tGPspoint *tpt);
void ED_gpencil_sbuffer_vertex_color_set(struct Depsgraph *depsgraph,
struct Object *ob,
struct ToolSettings *ts,
struct Brush *brush,
- struct Material *material);
+ struct Material *material,
+ float random_color[3],
+ float pen_pressure);
+void ED_gpencil_init_random_settings(struct Brush *brush,
+ const int mval[2],
+ struct GpRandomSettings *random_settings);
bool ED_gpencil_stroke_check_collision(struct GP_SpaceConversion *gsc,
struct bGPDstroke *gps,