Blender V5.0
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
8
9#pragma once
10
11#include "DNA_defs.h"
12#include "DNA_listBase.h"
13#include "DNA_modifier_enums.h"
14
17
18/* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE!
19 * (ONLY ADD NEW ITEMS AT THE END)
20 */
21
53
54typedef enum GpencilModifierMode {
59 eGpencilModifierMode_Expanded_DEPRECATED = (1 << 3),
60#endif
63
64typedef enum {
65 /* This modifier has been inserted in local override, and hence can be fully edited. */
68
69typedef struct GpencilModifierData {
71
72 int type, mode;
73 char _pad0[4];
74 short flag;
75 /* An "expand" bit for each of the modifier's (sub)panels (uiPanelDataExpansion). */
77 char name[/*MAX_NAME*/ 64];
78
79 char *error;
81
114
135
142
147
171
182
215
222
230
236
243
248
272
280
306
317
341
349
352 struct Object *object;
356 int count;
358 int flag;
360 float offset[3];
362 float shift[3];
364 float rnd_offset[3];
366 float rnd_rot[3];
368 float rnd_scale[3];
369
370 char _pad[4];
372 int seed;
373
377 char layername[64];
379 char materialname[64] DNA_DEPRECATED;
385
390
392 char layername[64];
394
396 char materialname[64] DNA_DEPRECATED;
397
400
407
411 float length;
412
414 short flag;
415
417 short mode;
420
426
433 char _pad[6];
434
436 struct Object *object;
437
440
442 float fade_fac;
444 char target_vgname[/*MAX_VGROUP_NAME*/ 64];
449
450typedef enum eBuildGpencil_Mode {
451 /* Strokes are shown one by one until all have appeared */
453 /* All strokes start at the same time */
455 /* Only the new strokes are built */
458
460 /* Show in forward order */
462 /* Hide in reverse order */
464 /* Hide in forward order */
467
469 /* All strokes start at same time */
471 /* All strokes end at same time */
473
474 /* TODO: Random Offsets, Stretch-to-Fill */
476
485
486typedef enum eBuildGpencil_Flag {
487 /* Restrict modifier to particular layer/passes? */
490
491 /* Restrict modifier to only operating between the nominated frames */
496
518
526
557
559 char name[64];
560 /* For path reference. */
562 int dash;
563 int gap;
564 float radius;
565 float opacity;
567 int flag;
569
590
598
616
627
630
631 struct Object *object;
635 char subtarget[/*MAX_NAME*/ 64];
637 char layername[/*MAX_NAME*/ 64];
642 char materialname[/*MAX_ID_NAME - 194*/ 64] DNA_DEPRECATED;
644 char vgname[/*MAX_VGROUP_NAME*/ 64];
649 char _pad[4];
650
651 int flag;
654 char _pad1[3];
656 float parentinv[4][4];
658 float cent[3];
660 float falloff;
661 float force;
664
673
685
713
720
722 /* Keep only one vertex every n vertices */
724 /* Use RDP algorithm */
726 /* Sample the stroke using a fixed length */
728 /* Sample the stroke doing vertex merge */
731
739
745 char layername[64];
747 char materialname[64] DNA_DEPRECATED;
749 char vgname[/*MAX_VGROUP_NAME*/ 64];
753 int flag;
754 float loc[3];
755 float rot[3];
756 float scale[3];
758 float rnd_offset[3];
760 float rnd_rot[3];
762 float rnd_scale[3];
764 int seed;
765 int mode;
769 char _pad[4];
770
772
781
806
820
832
838 char layername[64];
840 char materialname[64] DNA_DEPRECATED;
844 int flag;
847
848 int flags;
849
851 float distance;
852 /* -1:inner 0:middle 1:outer */
853 float offset;
854
858
860
862 /* GP_MULTIPLY_ENABLE_ANGLE_SPLITTING = (1 << 1), Deprecated. */
865
868
869 struct Object *object;
873 char layername[64];
875 char materialname[64] DNA_DEPRECATED;
877 char vgname[/*MAX_VGROUP_NAME*/ 64];
883 int flag;
885 int mode;
886
887 float factor;
888 float radius;
890 float rgb[3];
892 int type;
893
895
898
903
913
943
951
952/* Texture->mode */
958
984
1010
1020
1025
1026struct LineartCache;
1027
1030
1031 uint16_t edge_types; /* line type enable flags, bits in eLineartEdgeFlag */
1032
1035
1039
1042
1045
1048
1054 char vgname[64];
1055
1056 /* Camera focal length is divided by (1 + over-scan), before calculation, which give a wider FOV,
1057 * this doesn't change coordinates range internally (-1, 1), but makes the calculated frame
1058 * bigger than actual output. This is for the easier shifting calculation. A value of 0.5 means
1059 * the "internal" focal length become 2/3 of the actual camera. */
1061
1062 /* Values for point light and directional (sun) light. */
1063 /* For point light, fov always gonna be 120 deg horizontal, with 3 "cameras" covering 360 deg. */
1068
1069 float opacity;
1071
1072 unsigned char mask_switches; /* #GreasePencilLineartMaskSwitches */
1073 unsigned char material_mask_bits;
1074 unsigned char intersection_mask;
1075
1076 unsigned char shadow_selection;
1078 char _pad[1];
1079
1082
1085
1088
1089 /* CPU mode */
1091
1092 /* eLineartMainFlags, for one time calculation. */
1094
1095 /* #eLineArtGPencilModifierFlags, modifier internal state. */
1097
1098 /* Move strokes towards camera to avoid clipping while preserve depth for the viewport. */
1100
1101 /* Runtime data. */
1102
1103 /* Because we can potentially only compute features lines once per modifier stack (Use Cache), we
1104 * need to have these override values to ensure that we have the data we need is computed and
1105 * stored in the cache. */
1111
1112 char _pad2[6];
1113
1117
1119
1165
1171 /* Keep next bit as is to be equals to mesh modifier flag to reuse functions. */
1174
1180 char layername[64];
1182 char vgname[/*MAX_VGROUP_NAME*/ 64];
1186 int flag;
1187 int mode;
1195 int skip;
1198 /* Length of the envelope effect. */
1200
1201 char _pad[4];
1203
1211
1212/* Texture->mode */
@ GP_OUTLINE_INVERT_MATERIAL
@ GP_OUTLINE_INVERT_LAYERPASS
@ GP_TIME_SEG_MODE_PINGPONG
@ GP_SUBDIV_INVERT_MATERIAL
@ GP_SUBDIV_INVERT_LAYERPASS
@ eGpencilModifierMode_Render
@ eGpencilModifierMode_Editmode
@ eGpencilModifierMode_Virtual
@ eGpencilModifierMode_Realtime
@ GP_LATTICE_INVERT_LAYERPASS
@ GP_LATTICE_INVERT_MATERIAL
@ GP_BUILD_TRANSITION_SHRINK
@ GP_BUILD_TRANSITION_VANISH
@ GP_ENVELOPE_INVERT_LAYERPASS
@ GP_ENVELOPE_INVERT_MATERIAL
@ GP_SIMPLIFY_INVERT_MATERIAL
@ GP_SIMPLIFY_INVERT_LAYERPASS
@ GP_COLOR_INVERT_LAYERPASS
@ GP_SMOOTH_INVERT_LAYERPASS
@ GP_SMOOTH_INVERT_MATERIAL
@ GP_OPACITY_INVERT_MATERIAL
@ GP_OPACITY_INVERT_LAYERPASS
@ GP_THICK_INVERT_LAYERPASS
@ GP_MULTIPLY_ENABLE_FADING
@ GP_BUILD_TIMEMODE_PERCENTAGE
@ GP_BUILD_TIMEMODE_DRAWSPEED
@ eGPHook_Falloff_InvSquare
@ 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
@ eGpencilModifierFlag_OverrideLibrary_Local
@ 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
These structs are the foundation for all linked lists in the library system.
nullptr float
DashGpencilModifierSegment * segments
struct DashGpencilModifierData * dmd
struct GpencilModifierData * next
struct GpencilModifierData * prev
struct LatticeDeformData * cache_data
TimeGpencilModifierSegment * segments
struct TimeGpencilModifierData * gpmd
struct CurveMapping * curve_intensity
#define DNA_DEPRECATED_ALLOW
Definition versioning.cc:11