diff options
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_modifier_types.h | 19 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_types.h | 1 |
2 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h index 410212ce100..3977ad326da 100644 --- a/source/blender/makesdna/DNA_gpencil_modifier_types.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h @@ -878,6 +878,7 @@ typedef enum eLineArtGPencilModifierFlags { LRT_GPENCIL_MATCH_OUTPUT_VGROUP = (1 << 1), LRT_GPENCIL_BINARY_WEIGHTS = (1 << 2) /* Deprecated, this is removed for lack of use case. */, LRT_GPENCIL_IS_BAKED = (1 << 3), + LRT_GPENCIL_USE_CACHE = (1 << 4), } eLineArtGPencilModifierFlags; typedef enum eLineartGpencilTransparencyFlags { @@ -886,6 +887,8 @@ typedef enum eLineartGpencilTransparencyFlags { LRT_GPENCIL_TRANSPARENCY_MATCH = (1 << 1), } eLineartGpencilTransparencyFlags; +struct LineartCache; + typedef struct LineartGpencilModifierData { GpencilModifierData modifier; @@ -925,16 +928,24 @@ typedef struct LineartGpencilModifierData { /* CPU mode */ float chaining_image_threshold; - int _pad; - /* Ported from SceneLineArt flags. */ int calculation_flags; /* Additional Switches. */ int flags; - /* Runtime only. */ - void *render_buffer; + /* Runtime data. */ + + /* Because we can potentially only compute features lines once per modifier stack (Use Cache), we + * need to have these override values to ensure that we have the data we need is computed and + * stored in the cache. */ + char level_start_override; + char level_end_override; + short edge_types_override; + + struct LineartCache *cache; + /* Keep a pointer to the render buffer so we can call destroy from ModifierData. */ + struct LineartRenderBuffer *render_buffer_ptr; } LineartGpencilModifierData; diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index ea3c1ff7275..6b7b89e91fa 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -629,6 +629,7 @@ typedef struct bGPdata_Runtime { /** Brush pointer */ Brush *sbuffer_brush; struct GpencilBatchCache *gpencil_cache; + struct LineartCache *lineart_cache; } bGPdata_Runtime; /* grid configuration */ |