1 /* 2 * This program is free software; you can redistribute it and/or 3 * modify it under the terms of the GNU General Public License 4 * as published by the Free Software Foundation; either version 2 5 * of the License, or (at your option) any later version. 6 * 7 * This program is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * GNU General Public License for more details. 11 * 12 * You should have received a copy of the GNU General Public License 13 * along with this program; if not, write to the Free Software Foundation, 14 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 */ 16 17 /** \file 18 * \ingroup DNA 19 */ 20 21 #pragma once 22 23 #include "DNA_defs.h" 24 #include "DNA_listBase.h" 25 26 struct LatticeDeformData; 27 28 /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! 29 * (ONLY ADD NEW ITEMS AT THE END) 30 */ 31 32 typedef enum GpencilModifierType { 33 eGpencilModifierType_None = 0, 34 eGpencilModifierType_Noise = 1, 35 eGpencilModifierType_Subdiv = 2, 36 eGpencilModifierType_Thick = 3, 37 eGpencilModifierType_Tint = 4, 38 eGpencilModifierType_Array = 5, 39 eGpencilModifierType_Build = 6, 40 eGpencilModifierType_Opacity = 7, 41 eGpencilModifierType_Color = 8, 42 eGpencilModifierType_Lattice = 9, 43 eGpencilModifierType_Simplify = 10, 44 eGpencilModifierType_Smooth = 11, 45 eGpencilModifierType_Hook = 12, 46 eGpencilModifierType_Offset = 13, 47 eGpencilModifierType_Mirror = 14, 48 eGpencilModifierType_Armature = 15, 49 eGpencilModifierType_Time = 16, 50 eGpencilModifierType_Multiply = 17, 51 eGpencilModifierType_Texture = 18, 52 /* Keep last. */ 53 NUM_GREASEPENCIL_MODIFIER_TYPES, 54 } GpencilModifierType; 55 56 typedef enum GpencilModifierMode { 57 eGpencilModifierMode_Realtime = (1 << 0), 58 eGpencilModifierMode_Render = (1 << 1), 59 eGpencilModifierMode_Editmode = (1 << 2), 60 eGpencilModifierMode_Expanded_DEPRECATED = (1 << 3), 61 eGpencilModifierMode_Virtual = (1 << 4), 62 } GpencilModifierMode; 63 64 typedef enum { 65 /* This modifier has been inserted in local override, and hence can be fully edited. */ 66 eGpencilModifierFlag_OverrideLibrary_Local = (1 << 0), 67 } GpencilModifierFlag; 68 69 typedef struct GpencilModifierData { 70 struct GpencilModifierData *next, *prev; 71 72 int type, mode; 73 char _pad0[4]; 74 short flag; 75 short ui_expand_flag; 76 /** MAX_NAME. */ 77 char name[64]; 78 79 char *error; 80 } GpencilModifierData; 81 82 typedef struct NoiseGpencilModifierData { 83 GpencilModifierData modifier; 84 /** Material for filtering. */ 85 struct Material *material; 86 /** Layer name. */ 87 char layername[64]; 88 /** Material name. */ 89 char materialname[64] DNA_DEPRECATED; 90 /** Optional vertexgroup name, MAX_VGROUP_NAME. */ 91 char vgname[64]; 92 /** Custom index for passes. */ 93 int pass_index; 94 /** Several flags. */ 95 int flag; 96 /** Factor of noise. */ 97 float factor; 98 float factor_strength; 99 float factor_thickness; 100 float factor_uvs; 101 /** Noise Frequency scaling */ 102 float noise_scale; 103 /** How many frames before recalculate randoms. */ 104 int step; 105 /** Custom index for passes. */ 106 int layer_pass; 107 /** Random seed */ 108 int seed; 109 struct CurveMapping *curve_intensity; 110 } NoiseGpencilModifierData; 111 112 typedef enum eNoiseGpencil_Flag { 113 GP_NOISE_USE_RANDOM = (1 << 0), 114 GP_NOISE_MOD_LOCATION = (1 << 1), /* Deprecated (only for versioning). */ 115 GP_NOISE_MOD_STRENGTH = (1 << 2), /* Deprecated (only for versioning). */ 116 GP_NOISE_MOD_THICKNESS = (1 << 3), /* Deprecated (only for versioning). */ 117 GP_NOISE_FULL_STROKE = (1 << 4), 118 GP_NOISE_CUSTOM_CURVE = (1 << 5), 119 GP_NOISE_INVERT_LAYER = (1 << 6), 120 GP_NOISE_INVERT_PASS = (1 << 7), 121 GP_NOISE_INVERT_VGROUP = (1 << 8), 122 GP_NOISE_MOD_UV = (1 << 9), /* Deprecated (only for versioning). */ 123 GP_NOISE_INVERT_LAYERPASS = (1 << 10), 124 GP_NOISE_INVERT_MATERIAL = (1 << 11), 125 } eNoiseGpencil_Flag; 126 127 typedef struct SubdivGpencilModifierData { 128 GpencilModifierData modifier; 129 /** Material for filtering. */ 130 struct Material *material; 131 /** Layer name. */ 132 char layername[64]; 133 /** Material name. */ 134 char materialname[64] DNA_DEPRECATED; 135 /** Custom index for passes. */ 136 int pass_index; 137 /** Flags. */ 138 int flag; 139 /** Factor of subdivision. */ 140 int level; 141 /** Custom index for passes. */ 142 int layer_pass; 143 /** Type of subdivision */ 144 short type; 145 char _pad[6]; 146 } SubdivGpencilModifierData; 147 148 typedef enum eSubdivGpencil_Flag { 149 GP_SUBDIV_INVERT_LAYER = (1 << 1), 150 GP_SUBDIV_INVERT_PASS = (1 << 2), 151 GP_SUBDIV_INVERT_LAYERPASS = (1 << 3), 152 GP_SUBDIV_INVERT_MATERIAL = (1 << 4), 153 } eSubdivGpencil_Flag; 154 155 typedef enum eSubdivGpencil_Type { 156 GP_SUBDIV_CATMULL = 0, 157 GP_SUBDIV_SIMPLE = 1, 158 } eSubdivGpencil_Type; 159 160 typedef struct ThickGpencilModifierData { 161 GpencilModifierData modifier; 162 /** Material for filtering. */ 163 struct Material *material; 164 /** Layer name. */ 165 char layername[64]; 166 /** Material name. */ 167 char materialname[64] DNA_DEPRECATED; 168 /** Optional vertexgroup name, MAX_VGROUP_NAME. */ 169 char vgname[64]; 170 /** Custom index for passes. */ 171 int pass_index; 172 /** Flags. */ 173 int flag; 174 /** Relative thickness factor. */ 175 float thickness_fac; 176 /** Absolute thickness overide. */ 177 int thickness; 178 /** Custom index for passes. */ 179 int layer_pass; 180 char _pad[4]; 181 struct CurveMapping *curve_thickness; 182 } ThickGpencilModifierData; 183 184 typedef enum eThickGpencil_Flag { 185 GP_THICK_INVERT_LAYER = (1 << 0), 186 GP_THICK_INVERT_PASS = (1 << 1), 187 GP_THICK_INVERT_VGROUP = (1 << 2), 188 GP_THICK_CUSTOM_CURVE = (1 << 3), 189 GP_THICK_NORMALIZE = (1 << 4), 190 GP_THICK_INVERT_LAYERPASS = (1 << 5), 191 GP_THICK_INVERT_MATERIAL = (1 << 6), 192 } eThickGpencil_Flag; 193 194 typedef struct TimeGpencilModifierData { 195 GpencilModifierData modifier; 196 /** Layer name. */ 197 char layername[64]; 198 /** Custom index for passes. */ 199 int layer_pass; 200 /** Flags. */ 201 int flag; 202 int offset; 203 /** Animation scale. */ 204 float frame_scale; 205 int mode; 206 /** Start and end frame for custom range. */ 207 int sfra, efra; 208 char _pad[4]; 209 } TimeGpencilModifierData; 210 211 typedef enum eTimeGpencil_Flag { 212 GP_TIME_INVERT_LAYER = (1 << 0), 213 GP_TIME_KEEP_LOOP = (1 << 1), 214 GP_TIME_INVERT_LAYERPASS = (1 << 2), 215 GP_TIME_CUSTOM_RANGE = (1 << 3), 216 } eTimeGpencil_Flag; 217 218 typedef enum eTimeGpencil_Mode { 219 GP_TIME_MODE_NORMAL = 0, 220 GP_TIME_MODE_REVERSE = 1, 221 GP_TIME_MODE_FIX = 2, 222 } eTimeGpencil_Mode; 223 224 typedef enum eModifyColorGpencil_Flag { 225 GP_MODIFY_COLOR_BOTH = 0, 226 GP_MODIFY_COLOR_STROKE = 1, 227 GP_MODIFY_COLOR_FILL = 2, 228 GP_MODIFY_COLOR_HARDNESS = 3, 229 } eModifyColorGpencil_Flag; 230 231 typedef enum eOpacityModesGpencil_Flag { 232 GP_OPACITY_MODE_MATERIAL = 0, 233 GP_OPACITY_MODE_STRENGTH = 1, 234 } eOpacityModesGpencil_Flag; 235 236 typedef struct ColorGpencilModifierData { 237 GpencilModifierData modifier; 238 /** Material for filtering. */ 239 struct Material *material; 240 /** Layer name. */ 241 char layername[64]; 242 /** Material name. */ 243 char materialname[64] DNA_DEPRECATED; 244 /** Custom index for passes. */ 245 int pass_index; 246 /** Flags. */ 247 int flag; 248 /** Hsv factors. */ 249 float hsv[3]; 250 /** Modify stroke, fill or both. */ 251 char modify_color; 252 char _pad[3]; 253 /** Custom index for passes. */ 254 int layer_pass; 255 256 char _pad1[4]; 257 struct CurveMapping *curve_intensity; 258 } ColorGpencilModifierData; 259 260 typedef enum eColorGpencil_Flag { 261 GP_COLOR_INVERT_LAYER = (1 << 1), 262 GP_COLOR_INVERT_PASS = (1 << 2), 263 GP_COLOR_INVERT_LAYERPASS = (1 << 3), 264 GP_COLOR_INVERT_MATERIAL = (1 << 4), 265 GP_COLOR_CUSTOM_CURVE = (1 << 5), 266 } eColorGpencil_Flag; 267 268 typedef struct OpacityGpencilModifierData { 269 GpencilModifierData modifier; 270 /** Material for filtering. */ 271 struct Material *material; 272 /** Layer name. */ 273 char layername[64]; 274 /** Material name. */ 275 char materialname[64] DNA_DEPRECATED; 276 /** Optional vertexgroup name, MAX_VGROUP_NAME. */ 277 char vgname[64]; 278 /** Custom index for passes. */ 279 int pass_index; 280 /** Flags. */ 281 int flag; 282 /** Main Opacity factor. */ 283 float factor; 284 /** Modify stroke, fill or both. */ 285 char modify_color; 286 char _pad[3]; 287 /** Custom index for passes. */ 288 int layer_pass; 289 290 float hardeness; 291 struct CurveMapping *curve_intensity; 292 } OpacityGpencilModifierData; 293 294 typedef enum eOpacityGpencil_Flag { 295 GP_OPACITY_INVERT_LAYER = (1 << 0), 296 GP_OPACITY_INVERT_PASS = (1 << 1), 297 GP_OPACITY_INVERT_VGROUP = (1 << 2), 298 GP_OPACITY_INVERT_LAYERPASS = (1 << 4), 299 GP_OPACITY_INVERT_MATERIAL = (1 << 5), 300 GP_OPACITY_CUSTOM_CURVE = (1 << 6), 301 GP_OPACITY_NORMALIZE = (1 << 7), 302 } eOpacityGpencil_Flag; 303 304 typedef struct ArrayGpencilModifierData { 305 GpencilModifierData modifier; 306 struct Object *object; 307 /** Material for filtering. */ 308 struct Material *material; 309 /** Number of elements in array. */ 310 int count; 311 /** Several flags. */ 312 int flag; 313 /** Location increments. */ 314 float offset[3]; 315 /** Shift increment. */ 316 float shift[3]; 317 /** Random Offset. */ 318 float rnd_offset[3]; 319 /** Random Rotation. */ 320 float rnd_rot[3]; 321 /** Random Scales. */ 322 float rnd_scale[3]; 323 char _pad[4]; 324 /** (first element is the index) random values. */ 325 int seed; 326 327 /** Custom index for passes. */ 328 int pass_index; 329 /** Layer name. */ 330 char layername[64]; 331 /** Material name. */ 332 char materialname[64] DNA_DEPRECATED; 333 /** Material replace (0 keep default). */ 334 int mat_rpl; 335 /** Custom index for passes. */ 336 int layer_pass; 337 } ArrayGpencilModifierData; 338 339 typedef enum eArrayGpencil_Flag { 340 GP_ARRAY_INVERT_LAYER = (1 << 2), 341 GP_ARRAY_INVERT_PASS = (1 << 3), 342 GP_ARRAY_INVERT_LAYERPASS = (1 << 5), 343 GP_ARRAY_INVERT_MATERIAL = (1 << 6), 344 GP_ARRAY_USE_OFFSET = (1 << 7), 345 GP_ARRAY_USE_RELATIVE = (1 << 8), 346 GP_ARRAY_USE_OB_OFFSET = (1 << 9), 347 } eArrayGpencil_Flag; 348 349 typedef struct BuildGpencilModifierData { 350 GpencilModifierData modifier; 351 /** Material for filtering. */ 352 struct Material *material; 353 354 /** If set, restrict modifier to operating on this layer. */ 355 char layername[64]; 356 int pass_index; 357 358 /** Material name. */ 359 char materialname[64] DNA_DEPRECATED; 360 361 /** Custom index for passes. */ 362 int layer_pass; 363 364 /** 365 * If GP_BUILD_RESTRICT_TIME is set, 366 * the defines the frame range where GP frames are considered. 367 */ 368 float start_frame; 369 float end_frame; 370 371 /** For each pair of gp keys, number of frames before strokes start appearing. */ 372 float start_delay; 373 /** For each pair of gp keys, number of frames that build effect must be completed within. */ 374 float length; 375 376 /** (eGpencilBuild_Flag) Options for controlling modifier behavior. */ 377 short flag; 378 379 /** (eGpencilBuild_Mode) How are strokes ordered. */ 380 short mode; 381 /** (eGpencilBuild_Transition) In what order do stroke points appear/disappear. */ 382 short transition; 383 384 /** 385 * (eGpencilBuild_TimeAlignment) 386 * For the "Concurrent" mode, when should "shorter" strips start/end. 387 */ 388 short time_alignment; 389 /** Factor of the stroke (used instead of frame evaluation. */ 390 float percentage_fac; 391 char _pad[4]; 392 } BuildGpencilModifierData; 393 394 typedef enum eBuildGpencil_Mode { 395 /* Strokes are shown one by one until all have appeared */ 396 GP_BUILD_MODE_SEQUENTIAL = 0, 397 /* All strokes start at the same time */ 398 GP_BUILD_MODE_CONCURRENT = 1, 399 } eBuildGpencil_Mode; 400 401 typedef enum eBuildGpencil_Transition { 402 /* Show in forward order */ 403 GP_BUILD_TRANSITION_GROW = 0, 404 /* Hide in reverse order */ 405 GP_BUILD_TRANSITION_SHRINK = 1, 406 /* Hide in forward order */ 407 GP_BUILD_TRANSITION_FADE = 2, 408 } eBuildGpencil_Transition; 409 410 typedef enum eBuildGpencil_TimeAlignment { 411 /* All strokes start at same time */ 412 GP_BUILD_TIMEALIGN_START = 0, 413 /* All strokes end at same time */ 414 GP_BUILD_TIMEALIGN_END = 1, 415 416 /* TODO: Random Offsets, Stretch-to-Fill */ 417 } eBuildGpencil_TimeAlignment; 418 419 typedef enum eBuildGpencil_Flag { 420 /* Restrict modifier to particular layer/passes? */ 421 GP_BUILD_INVERT_LAYER = (1 << 0), 422 GP_BUILD_INVERT_PASS = (1 << 1), 423 424 /* Restrict modifier to only operating between the nominated frames */ 425 GP_BUILD_RESTRICT_TIME = (1 << 2), 426 GP_BUILD_INVERT_LAYERPASS = (1 << 3), 427 428 /* Use a percentage instead of frame number to evaluate strokes. */ 429 GP_BUILD_PERCENTAGE = (1 << 4), 430 } eBuildGpencil_Flag; 431 432 typedef struct LatticeGpencilModifierData { 433 GpencilModifierData modifier; 434 struct Object *object; 435 /** Material for filtering. */ 436 struct Material *material; 437 /** Layer name. */ 438 char layername[64]; 439 /** Material name. */ 440 char materialname[64] DNA_DEPRECATED; 441 /** Optional vertexgroup name, MAX_VGROUP_NAME. */ 442 char vgname[64]; 443 /** Custom index for passes. */ 444 int pass_index; 445 /** Flags. */ 446 int flag; 447 float strength; 448 /** Custom index for passes. */ 449 int layer_pass; 450 /** Runtime only. */ 451 struct LatticeDeformData *cache_data; 452 } LatticeGpencilModifierData; 453 454 typedef enum eLatticeGpencil_Flag { 455 GP_LATTICE_INVERT_LAYER = (1 << 0), 456 GP_LATTICE_INVERT_PASS = (1 << 1), 457 GP_LATTICE_INVERT_VGROUP = (1 << 2), 458 GP_LATTICE_INVERT_LAYERPASS = (1 << 3), 459 GP_LATTICE_INVERT_MATERIAL = (1 << 4), 460 } eLatticeGpencil_Flag; 461 462 typedef struct MirrorGpencilModifierData { 463 GpencilModifierData modifier; 464 struct Object *object; 465 /** Material for filtering. */ 466 struct Material *material; 467 /** Layer name. */ 468 char layername[64]; 469 /** Material name. */ 470 char materialname[64] DNA_DEPRECATED; 471 /** Custom index for passes. */ 472 int pass_index; 473 /** Flags. */ 474 int flag; 475 /** Custom index for passes. */ 476 int layer_pass; 477 char _pad[4]; 478 } MirrorGpencilModifierData; 479 480 typedef enum eMirrorGpencil_Flag { 481 GP_MIRROR_INVERT_LAYER = (1 << 0), 482 GP_MIRROR_INVERT_PASS = (1 << 1), 483 GP_MIRROR_CLIPPING = (1 << 2), 484 GP_MIRROR_AXIS_X = (1 << 3), 485 GP_MIRROR_AXIS_Y = (1 << 4), 486 GP_MIRROR_AXIS_Z = (1 << 5), 487 GP_MIRROR_INVERT_LAYERPASS = (1 << 6), 488 GP_MIRROR_INVERT_MATERIAL = (1 << 7), 489 } eMirrorGpencil_Flag; 490 491 typedef struct HookGpencilModifierData { 492 GpencilModifierData modifier; 493 494 struct Object *object; 495 /** Material for filtering. */ 496 struct Material *material; 497 /** Optional name of bone target, MAX_ID_NAME-2. */ 498 char subtarget[64]; 499 /** Layer name. */ 500 char layername[64]; 501 /** Material name. */ 502 char materialname[64] DNA_DEPRECATED; 503 /** Optional vertexgroup name, MAX_VGROUP_NAME. */ 504 char vgname[64]; 505 /** Custom index for passes. */ 506 int pass_index; 507 /** Custom index for passes. */ 508 int layer_pass; 509 char _pad[4]; 510 511 int flag; 512 /** Use enums from WarpGpencilModifier (exact same functionality). */ 513 char falloff_type; 514 char _pad1[3]; 515 /** Matrix making current transform unmodified. */ 516 float parentinv[4][4]; 517 /** Visualization of hook. */ 518 float cent[3]; 519 /** If not zero, falloff is distance where influence zero. */ 520 float falloff; 521 float force; 522 struct CurveMapping *curfalloff; 523 } HookGpencilModifierData; 524 525 typedef enum eHookGpencil_Flag { 526 GP_HOOK_INVERT_LAYER = (1 << 0), 527 GP_HOOK_INVERT_PASS = (1 << 1), 528 GP_HOOK_INVERT_VGROUP = (1 << 2), 529 GP_HOOK_UNIFORM_SPACE = (1 << 3), 530 GP_HOOK_INVERT_LAYERPASS = (1 << 4), 531 GP_HOOK_INVERT_MATERIAL = (1 << 5), 532 } eHookGpencil_Flag; 533 534 typedef enum eHookGpencil_Falloff { 535 eGPHook_Falloff_None = 0, 536 eGPHook_Falloff_Curve = 1, 537 eGPHook_Falloff_Sharp = 2, 538 eGPHook_Falloff_Smooth = 3, 539 eGPHook_Falloff_Root = 4, 540 eGPHook_Falloff_Linear = 5, 541 eGPHook_Falloff_Const = 6, 542 eGPHook_Falloff_Sphere = 7, 543 eGPHook_Falloff_InvSquare = 8, 544 } eHookGpencil_Falloff; 545 546 typedef struct SimplifyGpencilModifierData { 547 GpencilModifierData modifier; 548 /** Material for filtering. */ 549 struct Material *material; 550 /** Layer name. */ 551 char layername[64]; 552 /** Material name. */ 553 char materialname[64] DNA_DEPRECATED; 554 /** Custom index for passes. */ 555 int pass_index; 556 /** Flags. */ 557 int flag; 558 /** Factor of simplify. */ 559 float factor; 560 /** Type of simplify. */ 561 short mode; 562 /** Every n vertex to keep. */ 563 short step; 564 /** Custom index for passes. */ 565 int layer_pass; 566 /** Sample length */ 567 float length; 568 /** Merge distance */ 569 float distance; 570 char _pad[4]; 571 } SimplifyGpencilModifierData; 572 573 typedef enum eSimplifyGpencil_Flag { 574 GP_SIMPLIFY_INVERT_LAYER = (1 << 0), 575 GP_SIMPLIFY_INVERT_PASS = (1 << 1), 576 GP_SIMPLIFY_INVERT_LAYERPASS = (1 << 2), 577 GP_SIMPLIFY_INVERT_MATERIAL = (1 << 3), 578 } eSimplifyGpencil_Flag; 579 580 typedef enum eSimplifyGpencil_Mode { 581 /* Keep only one vertex every n vertices */ 582 GP_SIMPLIFY_FIXED = 0, 583 /* Use RDP algorithm */ 584 GP_SIMPLIFY_ADAPTIVE = 1, 585 /* Sample the stroke using a fixed length */ 586 GP_SIMPLIFY_SAMPLE = 2, 587 /* Sample the stroke doing vertex merge */ 588 GP_SIMPLIFY_MERGE = 3, 589 } eSimplifyGpencil_Mode; 590 591 typedef struct OffsetGpencilModifierData { 592 GpencilModifierData modifier; 593 /** Material for filtering. */ 594 struct Material *material; 595 /** Layer name. */ 596 char layername[64]; 597 /** Material name. */ 598 char materialname[64] DNA_DEPRECATED; 599 /** Optional vertexgroup name, MAX_VGROUP_NAME. */ 600 char vgname[64]; 601 /** Custom index for passes. */ 602 int pass_index; 603 /** Flags. */ 604 int flag; 605 float loc[3]; 606 float rot[3]; 607 float scale[3]; 608 /** Custom index for passes. */ 609 int layer_pass; 610 } OffsetGpencilModifierData; 611 612 typedef enum eOffsetGpencil_Flag { 613 GP_OFFSET_INVERT_LAYER = (1 << 0), 614 GP_OFFSET_INVERT_PASS = (1 << 1), 615 GP_OFFSET_INVERT_VGROUP = (1 << 2), 616 GP_OFFSET_INVERT_LAYERPASS = (1 << 3), 617 GP_OFFSET_INVERT_MATERIAL = (1 << 4), 618 } eOffsetGpencil_Flag; 619 620 typedef struct SmoothGpencilModifierData { 621 GpencilModifierData modifier; 622 /** Material for filtering. */ 623 struct Material *material; 624 /** Layer name. */ 625 char layername[64]; 626 /** Material name. */ 627 char materialname[64] DNA_DEPRECATED; 628 /** Optional vertexgroup name, MAX_VGROUP_NAME. */ 629 char vgname[64]; 630 /** Custom index for passes. */ 631 int pass_index; 632 /** Several flags. */ 633 int flag; 634 /** Factor of noise. */ 635 float factor; 636 /** How many times apply smooth. */ 637 int step; 638 /** Custom index for passes. */ 639 int layer_pass; 640 641 char _pad1[4]; 642 struct CurveMapping *curve_intensity; 643 } SmoothGpencilModifierData; 644 645 typedef enum eSmoothGpencil_Flag { 646 GP_SMOOTH_MOD_LOCATION = (1 << 0), 647 GP_SMOOTH_MOD_STRENGTH = (1 << 1), 648 GP_SMOOTH_MOD_THICKNESS = (1 << 2), 649 GP_SMOOTH_INVERT_LAYER = (1 << 3), 650 GP_SMOOTH_INVERT_PASS = (1 << 4), 651 GP_SMOOTH_INVERT_VGROUP = (1 << 5), 652 GP_SMOOTH_MOD_UV = (1 << 6), 653 GP_SMOOTH_INVERT_LAYERPASS = (1 << 7), 654 GP_SMOOTH_INVERT_MATERIAL = (1 << 4), 655 GP_SMOOTH_CUSTOM_CURVE = (1 << 8), 656 } eSmoothGpencil_Flag; 657 658 typedef struct ArmatureGpencilModifierData { 659 GpencilModifierData modifier; 660 /** #eArmature_DeformFlag use instead of #bArmature.deformflag. */ 661 short deformflag, multi; 662 int _pad; 663 struct Object *object; 664 /** Stored input of previous modifier, for vertex-group blending. */ 665 float (*vert_coords_prev)[3]; 666 /** MAX_VGROUP_NAME. */ 667 char vgname[64]; 668 669 } ArmatureGpencilModifierData; 670 671 typedef struct MultiplyGpencilModifierData { 672 GpencilModifierData modifier; 673 /** Material for filtering. */ 674 struct Material *material; 675 /** Layer name. */ 676 char layername[64]; 677 /** Material name. */ 678 char materialname[64] DNA_DEPRECATED; 679 /** Custom index for passes. */ 680 int pass_index; 681 /** Flags. */ 682 int flag; 683 /** Custom index for passes. */ 684 int layer_pass; 685 char _pad[4]; 686 687 int flags; 688 689 int duplications; 690 float distance; 691 /* -1:inner 0:middle 1:outer */ 692 float offset; 693 694 float fading_center; 695 float fading_thickness; 696 float fading_opacity; 697 698 /* in rad not deg */ 699 float split_angle; 700 701 /* char _pad[4]; */ 702 } MultiplyGpencilModifierData; 703 704 typedef enum eMultiplyGpencil_Flag { 705 GP_MULTIPLY_ENABLE_ANGLE_SPLITTING = (1 << 1), 706 GP_MULTIPLY_ENABLE_FADING = (1 << 2), 707 } eMultiplyGpencil_Flag; 708 709 typedef struct TintGpencilModifierData { 710 GpencilModifierData modifier; 711 712 struct Object *object; 713 /** Material for filtering. */ 714 struct Material *material; 715 /** Layer name. */ 716 char layername[64]; 717 /** Material name. */ 718 char materialname[64] DNA_DEPRECATED; 719 /** Optional vertexgroup name, MAX_VGROUP_NAME. */ 720 char vgname[64]; 721 /** Custom index for passes. */ 722 int pass_index; 723 /** Custom index for passes. */ 724 int layer_pass; 725 /** Flags. */ 726 int flag; 727 /** Mode (Stroke/Fill/Both). */ 728 int mode; 729 730 float factor; 731 float radius; 732 /** Simple Tint color. */ 733 float rgb[3]; 734 /** Type of Tint. */ 735 int type; 736 737 struct CurveMapping *curve_intensity; 738 739 struct ColorBand *colorband; 740 } TintGpencilModifierData; 741 742 typedef enum eTintGpencil_Type { 743 GP_TINT_UNIFORM = 0, 744 GP_TINT_GRADIENT = 1, 745 } eTintGpencil_Type; 746 747 typedef enum eTintGpencil_Flag { 748 GP_TINT_INVERT_LAYER = (1 << 0), 749 GP_TINT_INVERT_PASS = (1 << 1), 750 GP_TINT_INVERT_VGROUP = (1 << 2), 751 GP_TINT_INVERT_LAYERPASS = (1 << 4), 752 GP_TINT_INVERT_MATERIAL = (1 << 5), 753 GP_TINT_CUSTOM_CURVE = (1 << 6), 754 } eTintGpencil_Flag; 755 756 typedef struct TextureGpencilModifierData { 757 GpencilModifierData modifier; 758 /** Material for filtering. */ 759 struct Material *material; 760 /** Layer name. */ 761 char layername[64]; 762 /** Material name. */ 763 char materialname[64] DNA_DEPRECATED; 764 /** Optional vertexgroup name, MAX_VGROUP_NAME. */ 765 char vgname[64]; 766 /** Custom index for passes. */ 767 int pass_index; 768 /** Flags. */ 769 int flag; 770 /** Offset value to add to uv_fac. */ 771 float uv_offset; 772 float uv_scale; 773 float fill_rotation; 774 float fill_offset[2]; 775 float fill_scale; 776 /** Custom index for passes. */ 777 int layer_pass; 778 /** Texture fit options. */ 779 short fit_method; 780 short mode; 781 } TextureGpencilModifierData; 782 783 typedef enum eTextureGpencil_Flag { 784 GP_TEX_INVERT_LAYER = (1 << 0), 785 GP_TEX_INVERT_PASS = (1 << 1), 786 GP_TEX_INVERT_VGROUP = (1 << 2), 787 GP_TEX_INVERT_LAYERPASS = (1 << 3), 788 GP_TEX_INVERT_MATERIAL = (1 << 4), 789 } eTextureGpencil_Flag; 790 791 /* Texture->fit_method */ 792 typedef enum eTextureGpencil_Fit { 793 GP_TEX_FIT_STROKE = 0, 794 GP_TEX_CONSTANT_LENGTH = 1, 795 } eTextureGpencil_Fit; 796 797 /* Texture->mode */ 798 typedef enum eTextureGpencil_Mode { 799 STROKE = 0, 800 FILL = 1, 801 STROKE_AND_FILL = 2, 802 } eTextureGpencil_Mode; 803