Blender V4.3
DNA_gpencil_modifier_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "DNA_defs.h"
12#include "DNA_listBase.h"
13
16
17/* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE!
18 * (ONLY ADD NEW ITEMS AT THE END)
19 */
20
52
53typedef enum GpencilModifierMode {
58 eGpencilModifierMode_Expanded_DEPRECATED = (1 << 3),
59#endif
62
63typedef enum {
64 /* This modifier has been inserted in local override, and hence can be fully edited. */
67
68typedef struct GpencilModifierData {
70
71 int type, mode;
72 char _pad0[4];
73 short flag;
74 /* An "expand" bit for each of the modifier's (sub)panels (uiPanelDataExpansion). */
77 char name[64];
78
79 char *error;
81
114
115typedef enum eNoiseGpencil_Flag {
117 GP_NOISE_MOD_LOCATION = (1 << 1), /* Deprecated (only for versioning). */
118 GP_NOISE_MOD_STRENGTH = (1 << 2), /* Deprecated (only for versioning). */
119 GP_NOISE_MOD_THICKNESS = (1 << 3), /* Deprecated (only for versioning). */
125 GP_NOISE_MOD_UV = (1 << 9), /* Deprecated (only for versioning). */
129
134
155
162
167
191
202
204 char name[64];
205 /* For path reference. */
235
242
250
256
263
268
292
300
326
337
361
369
372 struct Object *object;
376 int count;
378 int flag;
380 float offset[3];
382 float shift[3];
384 float rnd_offset[3];
386 float rnd_rot[3];
388 float rnd_scale[3];
389
390 char _pad[4];
392 int seed;
393
397 char layername[64];
399 char materialname[64] DNA_DEPRECATED;
405
416
480
481typedef enum eBuildGpencil_Mode {
482 /* Strokes are shown one by one until all have appeared */
484 /* All strokes start at the same time */
486 /* Only the new strokes are built */
489
491 /* Show in forward order */
493 /* Hide in reverse order */
495 /* Hide in forward order */
498
500 /* All strokes start at same time */
502 /* All strokes end at same time */
504
505 /* TODO: Random Offsets, Stretch-to-Fill */
507
516
517typedef enum eBuildGpencil_Flag {
518 /* Restrict modifier to particular layer/passes? */
521
522 /* Restrict modifier to only operating between the nominated frames */
527
549
557
588
598
603
605 char name[64];
606 /* For path reference. */
608 int dash;
609 int gap;
610 float radius;
611 float opacity;
613 int flag;
615
636
644
662
673
676
677 struct Object *object;
681 char subtarget[64];
683 char layername[64];
685 char materialname[64] DNA_DEPRECATED;
687 char vgname[64];
692 char _pad[4];
693
694 int flag;
697 char _pad1[3];
699 float parentinv[4][4];
701 float cent[3];
703 float falloff;
704 float force;
707
716
728
756
763
765 /* Keep only one vertex every n vertices */
767 /* Use RDP algorithm */
769 /* Sample the stroke using a fixed length */
771 /* Sample the stroke doing vertex merge */
774
782
788 char layername[64];
790 char materialname[64] DNA_DEPRECATED;
792 char vgname[64];
796 int flag;
797 float loc[3];
798 float rot[3];
799 float scale[3];
801 float rnd_offset[3];
803 float rnd_rot[3];
805 float rnd_scale[3];
807 int seed;
808 int mode;
812 char _pad[4];
813
815
824
849
863
876
882 char layername[64];
884 char materialname[64] DNA_DEPRECATED;
888 int flag;
891
892 int flags;
893
895 float distance;
896 /* -1:inner 0:middle 1:outer */
897 float offset;
898
902
904
906 /* GP_MULTIPLY_ENABLE_ANGLE_SPLITTING = (1 << 1), Deprecated. */
909
942
947
957
987
995
996/* Texture->fit_method */
1001
1002/* Texture->mode */
1008
1034
1060
1070
1075
1076struct LineartCache;
1077
1080
1081 uint16_t edge_types; /* line type enable flags, bits in eLineartEdgeFlag */
1082
1085
1089
1092
1095
1098
1104 char vgname[64];
1105
1106 /* Camera focal length is divided by (1 + over-scan), before calculation, which give a wider FOV,
1107 * this doesn't change coordinates range internally (-1, 1), but makes the calculated frame
1108 * bigger than actual output. This is for the easier shifting calculation. A value of 0.5 means
1109 * the "internal" focal length become 2/3 of the actual camera. */
1111
1112 /* Values for point light and directional (sun) light. */
1113 /* For point light, fov always gonna be 120 deg horizontal, with 3 "cameras" covering 360 deg. */
1118
1119 float opacity;
1121
1122 unsigned char mask_switches; /* #GreasePencilLineartMaskSwitches */
1123 unsigned char material_mask_bits;
1124 unsigned char intersection_mask;
1125
1126 unsigned char shadow_selection;
1128 char _pad[1];
1129
1132
1135
1138
1139 /* CPU mode */
1141
1142 /* eLineartMainFlags, for one time calculation. */
1144
1145 /* #eLineArtGPencilModifierFlags, modifier internal state. */
1147
1148 /* Move strokes towards camera to avoid clipping while preserve depth for the viewport. */
1150
1151 /* Runtime data. */
1152
1153 /* Because we can potentially only compute features lines once per modifier stack (Use Cache), we
1154 * need to have these override values to ensure that we have the data we need is computed and
1155 * stored in the cache. */
1161
1162 char _pad2[6];
1163
1167
1169
1215
1221 /* Keep next bit as is to be equals to mesh modifier flag to reuse functions. */
1224
1230 char layername[64];
1232 char vgname[64];
1236 int flag;
1237 int mode;
1245 int skip;
1248 /* Length of the envelope effect. */
1250
1251 char _pad[4];
1253
1261
1262/* Texture->mode */
@ GP_OUTLINE_INVERT_MATERIAL
@ GP_OUTLINE_INVERT_LAYERPASS
@ GP_LENGTH_INVERT_MATERIAL
@ GP_LENGTH_INVERT_CURVATURE
@ GP_LENGTH_INVERT_LAYERPASS
@ GP_TIME_SEG_MODE_PINGPONG
struct SimplifyGpencilModifierData SimplifyGpencilModifierData
struct OffsetGpencilModifierData OffsetGpencilModifierData
struct BuildGpencilModifierData BuildGpencilModifierData
struct EnvelopeGpencilModifierData EnvelopeGpencilModifierData
@ GP_SUBDIV_INVERT_MATERIAL
@ GP_SUBDIV_INVERT_LAYERPASS
@ eGpencilModifierMode_Render
@ eGpencilModifierMode_Editmode
@ eGpencilModifierMode_Virtual
@ eGpencilModifierMode_Realtime
struct ShrinkwrapGpencilModifierData ShrinkwrapGpencilModifierData
@ GP_LATTICE_INVERT_LAYERPASS
@ GP_LATTICE_INVERT_MATERIAL
@ GP_BUILD_TRANSITION_SHRINK
@ GP_BUILD_TRANSITION_VANISH
struct SmoothGpencilModifierData SmoothGpencilModifierData
struct ArmatureGpencilModifierData ArmatureGpencilModifierData
@ GP_ENVELOPE_INVERT_LAYERPASS
@ GP_ENVELOPE_INVERT_MATERIAL
struct SubdivGpencilModifierData SubdivGpencilModifierData
struct GpencilModifierData GpencilModifierData
@ GP_SIMPLIFY_INVERT_MATERIAL
@ GP_SIMPLIFY_INVERT_LAYERPASS
struct DashGpencilModifierData DashGpencilModifierData
struct TimeGpencilModifierSegment TimeGpencilModifierSegment
struct TextureGpencilModifierData TextureGpencilModifierData
struct TintGpencilModifierData TintGpencilModifierData
@ GP_COLOR_INVERT_LAYERPASS
struct DashGpencilModifierSegment DashGpencilModifierSegment
struct MirrorGpencilModifierData MirrorGpencilModifierData
@ GP_SMOOTH_INVERT_LAYERPASS
@ GP_SMOOTH_INVERT_MATERIAL
@ GP_OPACITY_INVERT_MATERIAL
@ GP_OPACITY_INVERT_LAYERPASS
@ GP_THICK_INVERT_LAYERPASS
@ GP_MULTIPLY_ENABLE_FADING
struct LatticeGpencilModifierData LatticeGpencilModifierData
@ GP_BUILD_TIMEMODE_PERCENTAGE
@ GP_BUILD_TIMEMODE_DRAWSPEED
struct ColorGpencilModifierData ColorGpencilModifierData
@ eGPHook_Falloff_InvSquare
struct LineartGpencilModifierData LineartGpencilModifierData
struct WeightAngleGpencilModifierData WeightAngleGpencilModifierData
struct OpacityGpencilModifierData OpacityGpencilModifierData
struct HookGpencilModifierData HookGpencilModifierData
@ GP_ARRAY_UNIFORM_RANDOM_SCALE
@ GP_ARRAY_INVERT_LAYERPASS
struct OutlineGpencilModifierData OutlineGpencilModifierData
@ GP_OFFSET_INVERT_MATERIAL
@ GP_OFFSET_UNIFORM_RANDOM_SCALE
@ GP_OFFSET_INVERT_LAYERPASS
@ GP_BUILD_INVERT_LAYERPASS
@ GP_MIRROR_INVERT_MATERIAL
@ GP_MIRROR_INVERT_LAYERPASS
struct MultiplyGpencilModifierData MultiplyGpencilModifierData
@ eGpencilModifierFlag_OverrideLibrary_Local
struct ThickGpencilModifierData ThickGpencilModifierData
struct LengthGpencilModifierData LengthGpencilModifierData
@ GP_SHRINKWRAP_INVERT_VGROUP
@ GP_SHRINKWRAP_INVERT_LAYERPASS
@ GP_SHRINKWRAP_INVERT_MATERIAL
@ eGpencilModifierType_Dash
@ eGpencilModifierType_Array
@ eGpencilModifierType_Noise
@ eGpencilModifierType_Mirror
@ eGpencilModifierType_Color
@ eGpencilModifierType_Multiply
@ eGpencilModifierType_Texture
@ eGpencilModifierType_Subdiv
@ eGpencilModifierType_Length
@ eGpencilModifierType_Lattice
@ eGpencilModifierType_Opacity
@ eGpencilModifierType_Hook
@ eGpencilModifierType_Simplify
@ eGpencilModifierType_Shrinkwrap
@ eGpencilModifierType_WeightProximity
@ eGpencilModifierType_Armature
@ eGpencilModifierType_WeightAngle
@ eGpencilModifierType_Lineart
@ eGpencilModifierType_None
@ eGpencilModifierType_Smooth
@ eGpencilModifierType_Tint
@ eGpencilModifierType_Outline
@ eGpencilModifierType_Envelope
@ NUM_GREASEPENCIL_MODIFIER_TYPES
@ eGpencilModifierType_Time
@ eGpencilModifierType_Thick
@ eGpencilModifierType_Build
@ eGpencilModifierType_Offset
struct ArrayGpencilModifierData ArrayGpencilModifierData
struct TimeGpencilModifierData TimeGpencilModifierData
@ GP_NOISE_INVERT_LAYERPASS
struct WeightProxGpencilModifierData WeightProxGpencilModifierData
struct NoiseGpencilModifierData NoiseGpencilModifierData
These structs are the foundation for all linked lists in the library system.
#define DNA_DEPRECATED_ALLOW
draw_view in_light_buf[] float
unsigned short uint16_t
Definition stdint.h:79
DashGpencilModifierSegment * segments
struct DashGpencilModifierData * dmd
struct GpencilModifierData * next
struct GpencilModifierData * prev
struct LatticeDeformData * cache_data
TimeGpencilModifierSegment * segments
struct TimeGpencilModifierData * gpmd
struct CurveMapping * curve_intensity