diff options
author | YimingWu <xp8110@outlook.com> | 2021-06-16 17:38:47 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2021-06-16 17:38:47 +0300 |
commit | 247abdbf4148843daf469285a6a63ab9cd0aeef9 (patch) | |
tree | 78a20d5175b09c83d907aaddef347536bf20aca8 /source/blender/blenkernel/BKE_gpencil_modifier.h | |
parent | b37093de7b42cf331a4ae5830737d9972d7bb426 (diff) |
LineArt: Cached calculation for modifiers in the same stack.
This allows line art to run only once for each modifier stacks,
with an option to toggle a specific line art modifier should
use cache or re-do their own calculations.
Reviewed By: Sebastian Parborg (zeddb), Hans Goudey (HooglyBoogly)
Differential Revision: https://developer.blender.org/D11291
Diffstat (limited to 'source/blender/blenkernel/BKE_gpencil_modifier.h')
-rw-r--r-- | source/blender/blenkernel/BKE_gpencil_modifier.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil_modifier.h b/source/blender/blenkernel/BKE_gpencil_modifier.h index c6406c8478c..8fbc2112c77 100644 --- a/source/blender/blenkernel/BKE_gpencil_modifier.h +++ b/source/blender/blenkernel/BKE_gpencil_modifier.h @@ -294,6 +294,22 @@ bool BKE_gpencil_has_geometry_modifiers(struct Object *ob); bool BKE_gpencil_has_time_modifiers(struct Object *ob); bool BKE_gpencil_has_transform_modifiers(struct Object *ob); +/* Stores the maximum calculation range in the whole modifier stack for line art so the cache can + * cover everything that will be visible. */ +typedef struct GpencilLineartLimitInfo { + char min_level; + char max_level; + short edge_types; +} GpencilLineartLimitInfo; + +GpencilLineartLimitInfo BKE_gpencil_get_lineart_modifier_limits(const struct Object *ob); + +void BKE_gpencil_set_lineart_modifier_limits(struct GpencilModifierData *md, + const struct GpencilLineartLimitInfo *info, + const bool is_first_lineart); +bool BKE_gpencil_is_first_lineart_in_stack(const struct Object *ob, + const struct GpencilModifierData *md); + void BKE_gpencil_lattice_init(struct Object *ob); void BKE_gpencil_lattice_clear(struct Object *ob); |