|
Blender V4.3
|
#include <cstdio>#include "BKE_gpencil_update_cache_legacy.h"#include "BLI_dlrbTree.h"#include "BLI_listbase.h"#include "DNA_gpencil_legacy_types.h"#include "MEM_guardedalloc.h"Go to the source code of this file.
Functions | |
| static GPencilUpdateCache * | update_cache_alloc (int index, int flag, void *data) |
| static void | cache_node_free (void *node) |
| static void | update_cache_free (GPencilUpdateCache *cache) |
| static void | gpencil_traverse_update_cache_ex (GPencilUpdateCache *parent_cache, GPencilUpdateCacheTraverseSettings *ts, int depth, void *user_data) |
Update Cache API | |
| GPencilUpdateCache * | BKE_gpencil_create_update_cache (void *data, bool full_copy) |
| void | BKE_gpencil_traverse_update_cache (GPencilUpdateCache *cache, GPencilUpdateCacheTraverseSettings *ts, void *user_data) |
| void | BKE_gpencil_free_update_cache (bGPdata *gpd) |
| GPencilUpdateCache * BKE_gpencil_create_update_cache | ( | void * | data, |
| bool | full_copy ) |
Allocates a new GPencilUpdateCache and populates it.
| data | A data pointer to populate the initial cache with. |
| full_copy | If true, will mark this update cache as a full copy (GP_UPDATE_NODE_FULL_COPY). If false, it will be marked as a struct copy (GP_UPDATE_NODE_LIGHT_COPY). |
Definition at line 79 of file gpencil_update_cache_legacy.cc.
References data, GP_UPDATE_NODE_FULL_COPY, GP_UPDATE_NODE_LIGHT_COPY, and update_cache_alloc().
| void BKE_gpencil_free_update_cache | ( | struct bGPdata * | gpd | ) |
Frees the GPencilUpdateCache on the gpd->runtime. This will not free the data that the cache node might point to. It assumes that the cache does not own the data.
Definition at line 92 of file gpencil_update_cache_legacy.cc.
References bGPdata::runtime, bGPdata_Runtime::update_cache, and update_cache_free().
Referenced by BKE_gpencil_free_data().
| void BKE_gpencil_traverse_update_cache | ( | GPencilUpdateCache * | cache, |
| GPencilUpdateCacheTraverseSettings * | ts, | ||
| void * | user_data ) |
Traverses an update cache and executes callbacks at each level.
| cache | The update cache to traverse. |
| ts | The traversal settings. This stores the callbacks that are called at each level. |
| user_data | Custom data passed to each callback. |
Definition at line 85 of file gpencil_update_cache_legacy.cc.
References gpencil_traverse_update_cache_ex().
|
static |
Definition at line 41 of file gpencil_update_cache_legacy.cc.
References MEM_freeN(), and update_cache_free().
Referenced by update_cache_free().
|
static |
Definition at line 50 of file gpencil_update_cache_legacy.cc.
References BLI_listbase_is_empty(), cache_node(), GPencilUpdateCache::children, gpencil_traverse_update_cache_ex(), LISTBASE_FOREACH, and GPencilUpdateCacheTraverseSettings::update_cache_cb.
Referenced by BKE_gpencil_traverse_update_cache(), and gpencil_traverse_update_cache_ex().
|
static |
Definition at line 20 of file gpencil_update_cache_legacy.cc.
References BLI_dlrbTree_new(), GPencilUpdateCache::children, data, GPencilUpdateCache::data, flag, GPencilUpdateCache::flag, GPencilUpdateCache::index, and MEM_callocN.
Referenced by BKE_gpencil_create_update_cache().
|
static |
Definition at line 34 of file gpencil_update_cache_legacy.cc.
References BLI_dlrbTree_free(), cache_node_free(), GPencilUpdateCache::children, MEM_freeN(), and MEM_SAFE_FREE.
Referenced by BKE_gpencil_free_update_cache(), and cache_node_free().