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:
authorAntonioya <blendergit@gmail.com>2018-12-15 19:21:47 +0300
committerAntonioya <blendergit@gmail.com>2018-12-15 19:21:47 +0300
commit351f537fa832c50971454af304a071c096427e71 (patch)
tree3746ee812d1104dd6cdc13549ea80ee7e16b00dc /source/blender/makesdna
parentf9917a8d431f5480d9a5d58dfcf84863911f3bf2 (diff)
GP: New Curve primitive and other primitive improvements
This commit adds support for new curve tool and adds more functionalities to the existing primitives, including new handles, editing, stroke thickness curve, noise, preview of the real stroke, etc. Thanks to @charlie for his great contribution to this improvement.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_color_types.h1
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h11
-rw-r--r--source/blender/makesdna/DNA_scene_types.h3
3 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h
index 01f0b06c178..bf205729a72 100644
--- a/source/blender/makesdna/DNA_color_types.h
+++ b/source/blender/makesdna/DNA_color_types.h
@@ -103,6 +103,7 @@ typedef enum eCurveMappingPreset {
CURVE_PRESET_ROUND = 5,
CURVE_PRESET_ROOT = 6,
CURVE_PRESET_GAUSS = 7,
+ CURVE_PRESET_BELL = 8,
} eCurveMappingPreset;
/* CurveMapping->tone */
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 43ce3649db3..934ef4a4829 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -48,6 +48,13 @@ struct MDeformVert;
/* ***************************************** */
/* GP Stroke Points */
+/* 'Control Point' data for primitives and curves */
+typedef struct bGPDcontrolpoint {
+ float x, y, z; /* x and y coordinates of control point */
+ float color[4]; /* point color */
+ int size; /* radius */
+} bGPDcontrolpoint;
+
/* Grease-Pencil Annotations - 'Stroke Point'
* -> Coordinates may either be 2d or 3d depending on settings at the time
* -> Coordinates of point on stroke, in proportions of window size
@@ -345,6 +352,10 @@ typedef struct bGPdata_Runtime {
short sbuffer_size; /* number of elements currently in cache */
short sbuffer_sflag; /* flags for stroke that cache represents */
char pad_[6];
+
+ int tot_cp_points; /* number of control-points for stroke */
+ char pad1_[4];
+ bGPDcontrolpoint *cp_points; /* array of control-points for stroke */
} bGPdata_Runtime;
/* grid configuration */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index c1853ce1745..b06ab596059 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1035,6 +1035,7 @@ typedef struct GP_Sculpt_Settings {
int weighttype; /* eGP_Sculpt_Types (weight paint) */
char pad[4];
struct CurveMapping *cur_falloff; /* multiframe edit falloff effect by frame */
+ struct CurveMapping *cur_primitive; /* Curve used for primitve tools */
} GP_Sculpt_Settings;
/* GP_Sculpt_Settings.flag */
@@ -1053,6 +1054,8 @@ typedef enum eGP_Sculpt_SettingsFlag {
GP_SCULPT_SETT_FLAG_FRAME_FALLOFF = (1 << 5),
/* apply brush to uv data */
GP_SCULPT_SETT_FLAG_APPLY_UV = (1 << 6),
+ /* apply primitve curve */
+ GP_SCULPT_SETT_FLAG_PRIMITIVE_CURVE = (1 << 7),
} eGP_Sculpt_SettingsFlag;
/* Settings for GP Interpolation Operators */