Blender V4.3
BKE_gpencil_update_cache_legacy.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include "BLI_sys_types.h" /* for bool */
16
17struct DLRBT_Tree;
19struct bGPDframe;
20struct bGPDlayer;
21struct bGPDstroke;
22struct bGPdata;
23
26 /* Node is a placeholder (e.g. when only an index is needed). */
28 /* Copy only element, not the content. */
30 /* Copy the element as well as all of its content. */
33
47typedef struct GPencilUpdateCache {
48 /* Mapping from index to a GPencilUpdateCache struct. */
50 /* eGPUpdateCacheNodeFlag */
51 int flag;
52 /* Index of the element in the linked-list. */
53 int index;
54 /* Pointer to one of bGPdata, bGPDLayer, bGPDFrame, bGPDStroke. */
55 void *data;
57
58/* Node structure in the DLRBT_Tree for GPencilUpdateCache mapping. */
59typedef struct GPencilUpdateCacheNode {
60 /* DLRB tree capabilities. */
65
66 char _pad[7];
67 /* Content of DLRB tree node. */
70
78typedef bool (*GPencilUpdateCacheIter_Cb)(GPencilUpdateCache *cache, void *user_data);
79
81 /* Callbacks for the update cache traversal. Callback with index 0 is for layers, 1 for frames
82 * and 2 for strokes. */
85
93GPencilUpdateCache *BKE_gpencil_create_update_cache(void *data, bool full_copy);
94
103 void *user_data);
104
109void BKE_gpencil_free_update_cache(struct bGPdata *gpd);
110
111#ifdef __cplusplus
112}
113#endif
struct GPencilUpdateCacheTraverseSettings GPencilUpdateCacheTraverseSettings
bool(* GPencilUpdateCacheIter_Cb)(GPencilUpdateCache *cache, void *user_data)
GPencilUpdateCache * BKE_gpencil_create_update_cache(void *data, bool full_copy)
void BKE_gpencil_free_update_cache(struct bGPdata *gpd)
struct GPencilUpdateCacheNode GPencilUpdateCacheNode
struct GPencilUpdateCache GPencilUpdateCache
void BKE_gpencil_traverse_update_cache(GPencilUpdateCache *cache, GPencilUpdateCacheTraverseSettings *ts, void *user_data)
struct GPencilUpdateCacheNode * next
struct GPencilUpdateCacheNode * parent
struct GPencilUpdateCacheNode * prev
struct GPencilUpdateCacheNode * left
struct GPencilUpdateCacheNode * right