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-03-13 12:28:30 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-03-13 12:28:59 +0300
commitde9c7bae7b9e7c66584531953c5acae274c013c2 (patch)
tree737bb6e21a171f636ae2ae8d1fbeb2afb82f93b9 /source/blender/makesdna
parentdf032580c170d9f5e508b34673b84a14f8808990 (diff)
GPencil: Join Tint and Vertex Color modifier
Both are doing almost the same and can be merged. This reduce complexity for user and less code to maintain. Reviewed By: mendio, pepeland, fclem Differential Revision: https://developer.blender.org/D7134
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h67
1 files changed, 21 insertions, 46 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 1121bdf4df0..4f1dd08cd30 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -47,7 +47,6 @@ typedef enum GpencilModifierType {
eGpencilModifierType_Armature = 15,
eGpencilModifierType_Time = 16,
eGpencilModifierType_Multiply = 17,
- eGpencilModifierType_Vertexcolor = 18,
NUM_GREASEPENCIL_MODIFIER_TYPES,
} GpencilModifierType;
@@ -223,38 +222,6 @@ typedef enum eOpacityModesGpencil_Flag {
GP_OPACITY_MODE_STRENGTH = 1,
} eOpacityModesGpencil_Flag;
-typedef struct TintGpencilModifierData {
- GpencilModifierData modifier;
- /** Layer name. */
- char layername[64];
- /** Material name. */
- char materialname[64];
- /** Custom index for passes. */
- int pass_index;
- /** Flags. */
- int flag;
- /** Tint color. */
- float rgb[3];
- /** Mix factor. */
- float factor;
- /** Modify stroke, fill or both. */
- char modify_color;
- char _pad[7];
- /** Custom index for passes. */
- int layer_pass;
-
- char _pad1[4];
- struct CurveMapping *curve_intensity;
-} TintGpencilModifierData;
-
-typedef enum eTintGpencil_Flag {
- GP_TINT_INVERT_LAYER = (1 << 1),
- GP_TINT_INVERT_PASS = (1 << 2),
- GP_TINT_INVERT_LAYERPASS = (1 << 3),
- GP_TINT_INVERT_MATERIAL = (1 << 4),
- GP_TINT_CUSTOM_CURVE = (1 << 5),
-} eTintGpencil_Flag;
-
typedef struct ColorGpencilModifierData {
GpencilModifierData modifier;
/** Layer name. */
@@ -700,7 +667,7 @@ typedef enum eMultiplyGpencil_Flag {
GP_MULTIPLY_ENABLE_FADING = (1 << 2),
} eMultiplyGpencil_Flag;
-typedef struct VertexcolorGpencilModifierData {
+typedef struct TintGpencilModifierData {
GpencilModifierData modifier;
struct Object *object;
@@ -716,25 +683,33 @@ typedef struct VertexcolorGpencilModifierData {
int layer_pass;
/** Flags. */
int flag;
- /** Mode. */
+ /** Mode (Stroke/Fill/Both). */
int mode;
float factor;
float radius;
+ /** Simple Tint color. */
+ float rgb[3];
+ /** Type of Tint. */
+ int type;
struct CurveMapping *curve_intensity;
struct ColorBand *colorband;
-} VertexcolorGpencilModifierData;
-
-typedef enum eVertexcolorGpencil_Flag {
- GP_VERTEXCOL_INVERT_LAYER = (1 << 0),
- GP_VERTEXCOL_INVERT_PASS = (1 << 1),
- GP_VERTEXCOL_INVERT_VGROUP = (1 << 2),
- GP_VERTEXCOL_UNIFORM_SPACE = (1 << 3),
- GP_VERTEXCOL_INVERT_LAYERPASS = (1 << 4),
- GP_VERTEXCOL_INVERT_MATERIAL = (1 << 5),
- GP_VERTEXCOL_CUSTOM_CURVE = (1 << 6),
-} eVertexcolorGpencil_Flag;
+} TintGpencilModifierData;
+
+typedef enum eTintGpencil_Type {
+ GP_TINT_UNIFORM = 0,
+ GP_TINT_GRADIENT = 1,
+} eTintGpencil_Type;
+
+typedef enum eTintGpencil_Flag {
+ GP_TINT_INVERT_LAYER = (1 << 0),
+ GP_TINT_INVERT_PASS = (1 << 1),
+ GP_TINT_INVERT_VGROUP = (1 << 2),
+ GP_TINT_INVERT_LAYERPASS = (1 << 4),
+ GP_TINT_INVERT_MATERIAL = (1 << 5),
+ GP_TINT_CUSTOM_CURVE = (1 << 6),
+} eTintGpencil_Flag;
#endif /* __DNA_GPENCIL_MODIFIER_TYPES_H__ */