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>2021-09-22 16:50:38 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-09-22 16:54:34 +0300
commit368b56c9a132f7a37c638d16fc4c263d211bc4ed (patch)
treead71659706e5b5ff78e56b74ec6e2f7cbd9ee00d /source/blender/makesdna/DNA_gpencil_modifier_types.h
parent9f6313498a0af386f08ed17c83bf33b8c2c3b5b3 (diff)
GPencil: Split Weight modifier in two to make more consistent
The old modifier had two modes, but it is better to keep separated as meshes. The UI has changed to be more consistent, including a new column type of modifiers. Note: The logic has not changed with the previous version of the modifier, just is a split on two modifiers.. Reviewed By: mendio, pablovazquez Differential Revision: https://developer.blender.org/D12586
Diffstat (limited to 'source/blender/makesdna/DNA_gpencil_modifier_types.h')
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h49
1 files changed, 31 insertions, 18 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 43469fbb46b..8d967a38808 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -55,8 +55,9 @@ typedef enum GpencilModifierType {
eGpencilModifierType_Texture = 18,
eGpencilModifierType_Lineart = 19,
eGpencilModifierType_Length = 20,
- eGpencilModifierType_Weight = 21,
+ eGpencilModifierType_WeightProximity = 21,
eGpencilModifierType_Dash = 22,
+ eGpencilModifierType_WeightAngle = 23,
/* Keep last. */
NUM_GREASEPENCIL_MODIFIER_TYPES,
} GpencilModifierType;
@@ -896,7 +897,7 @@ typedef enum eTextureGpencil_Mode {
STROKE_AND_FILL = 2,
} eTextureGpencil_Mode;
-typedef struct WeightGpencilModifierData {
+typedef struct WeightProxGpencilModifierData {
GpencilModifierData modifier;
/** Target vertexgroup name, MAX_VGROUP_NAME. */
char target_vgname[64];
@@ -914,22 +915,39 @@ typedef struct WeightGpencilModifierData {
float min_weight;
/** Custom index for passes. */
int layer_pass;
- /** Calculation Mode. */
- short mode;
- /** Axis. */
- short axis;
- /** Angle */
- float angle;
/** Start/end distances. */
float dist_start;
float dist_end;
- /** Space (Local/World). */
- short space;
- char _pad[6];
/** Reference object */
struct Object *object;
-} WeightGpencilModifierData;
+} WeightProxGpencilModifierData;
+
+typedef struct WeightAngleGpencilModifierData {
+ GpencilModifierData modifier;
+ /** Target vertexgroup name, MAX_VGROUP_NAME. */
+ char target_vgname[64];
+ /** Material for filtering. */
+ struct Material *material;
+ /** Layer name. */
+ char layername[64];
+ /** Optional vertexgroup filter name, MAX_VGROUP_NAME. */
+ char vgname[64];
+ /** Custom index for passes. */
+ int pass_index;
+ /** Flags. */
+ int flag;
+ /** Minimum valid weight (clamp value). */
+ float min_weight;
+ /** Custom index for passes. */
+ int layer_pass;
+ /** Axis. */
+ short axis;
+ /** Space (Local/World). */
+ short space;
+ /** Angle */
+ float angle;
+} WeightAngleGpencilModifierData;
typedef enum eWeightGpencil_Flag {
GP_WEIGHT_INVERT_LAYER = (1 << 0),
@@ -937,15 +955,10 @@ typedef enum eWeightGpencil_Flag {
GP_WEIGHT_INVERT_VGROUP = (1 << 2),
GP_WEIGHT_INVERT_LAYERPASS = (1 << 3),
GP_WEIGHT_INVERT_MATERIAL = (1 << 4),
- GP_WEIGHT_BLEND_DATA = (1 << 5),
+ GP_WEIGHT_MULTIPLY_DATA = (1 << 5),
GP_WEIGHT_INVERT_OUTPUT = (1 << 6),
} eWeightGpencil_Flag;
-typedef enum eWeightGpencilModifierMode {
- GP_WEIGHT_MODE_DISTANCE = 0,
- GP_WEIGHT_MODE_ANGLE = 1,
-} eWeightGpencilModifierMode;
-
typedef enum eGpencilModifierSpace {
GP_SPACE_LOCAL = 0,
GP_SPACE_WORLD = 1,