Blender V4.5
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];
639 char materialname[/*MAX_ID_NAME - 2*/ 64] DNA_DEPRECATED;
641 char vgname[/*MAX_VGROUP_NAME*/ 64];
646 char _pad[4];
647
648 int flag;
651 char _pad1[3];
653 float parentinv[4][4];
655 float cent[3];
657 float falloff;
658 float force;
661
670
682
710
717
719 /* Keep only one vertex every n vertices */
721 /* Use RDP algorithm */
723 /* Sample the stroke using a fixed length */
725 /* Sample the stroke doing vertex merge */
728
736
742 char layername[64];
744 char materialname[64] DNA_DEPRECATED;
746 char vgname[/*MAX_VGROUP_NAME*/ 64];
750 int flag;
751 float loc[3];
752 float rot[3];
753 float scale[3];
755 float rnd_offset[3];
757 float rnd_rot[3];
759 float rnd_scale[3];
761 int seed;
762 int mode;
766 char _pad[4];
767
769
778
803
817
829
835 char layername[64];
837 char materialname[64] DNA_DEPRECATED;
841 int flag;
844
845 int flags;
846
848 float distance;
849 /* -1:inner 0:middle 1:outer */
850 float offset;
851
855
857
859 /* GP_MULTIPLY_ENABLE_ANGLE_SPLITTING = (1 << 1), Deprecated. */
862
865
866 struct Object *object;
870 char layername[64];
872 char materialname[64] DNA_DEPRECATED;
874 char vgname[/*MAX_VGROUP_NAME*/ 64];
880 int flag;
882 int mode;
883
884 float factor;
885 float radius;
887 float rgb[3];
889 int type;
890
892
895
900
910
940
948
949/* Texture->mode */
955
981
1007
1017
1022
1023struct LineartCache;
1024
1027
1028 uint16_t edge_types; /* line type enable flags, bits in eLineartEdgeFlag */
1029
1032
1036
1039
1042
1045
1051 char vgname[64];
1052
1053 /* Camera focal length is divided by (1 + over-scan), before calculation, which give a wider FOV,
1054 * this doesn't change coordinates range internally (-1, 1), but makes the calculated frame
1055 * bigger than actual output. This is for the easier shifting calculation. A value of 0.5 means
1056 * the "internal" focal length become 2/3 of the actual camera. */
1058
1059 /* Values for point light and directional (sun) light. */
1060 /* For point light, fov always gonna be 120 deg horizontal, with 3 "cameras" covering 360 deg. */
1065
1066 float opacity;
1068
1069 unsigned char mask_switches; /* #GreasePencilLineartMaskSwitches */
1070 unsigned char material_mask_bits;
1071 unsigned char intersection_mask;
1072
1073 unsigned char shadow_selection;
1075 char _pad[1];
1076
1079
1082
1085
1086 /* CPU mode */
1088
1089 /* eLineartMainFlags, for one time calculation. */
1091
1092 /* #eLineArtGPencilModifierFlags, modifier internal state. */
1094
1095 /* Move strokes towards camera to avoid clipping while preserve depth for the viewport. */
1097
1098 /* Runtime data. */
1099
1100 /* Because we can potentially only compute features lines once per modifier stack (Use Cache), we
1101 * need to have these override values to ensure that we have the data we need is computed and
1102 * stored in the cache. */
1108
1109 char _pad2[6];
1110
1114
1116
1162
1168 /* Keep next bit as is to be equals to mesh modifier flag to reuse functions. */
1171
1177 char layername[64];
1179 char vgname[/*MAX_VGROUP_NAME*/ 64];
1183 int flag;
1184 int mode;
1192 int skip;
1195 /* Length of the envelope effect. */
1197
1198 char _pad[4];
1200
1208
1209/* 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.
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