Blender  V3.3
deg_eval_runtime_backup_gpencil.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2022 Blender Foundation. All rights reserved. */
3 
9 #include "intern/depsgraph.h"
10 
11 #include "BKE_gpencil.h"
13 
14 #include "DNA_gpencil_types.h"
15 
16 namespace blender::deg {
17 
19 {
20 }
21 
23 {
24 }
25 
27 {
28  bGPdata *gpd_orig = reinterpret_cast<bGPdata *>(gpd->id.orig_id);
29 
30  /* We check for the active depsgraph here to avoid freeing the cache on the original object
31  * multiple times. This free is only needed for the case where we tagged a full update in the
32  * update cache and did not do an update-on-write. */
33  if (depsgraph->is_active) {
35  }
36  /* Doing a copy-on-write copies the update cache pointer. Make sure to reset it
37  * to NULL as we should never use the update cache from eval data. */
38  gpd->runtime.update_cache = nullptr;
39  /* Make sure to update the original runtime pointers in the eval data. */
41 }
42 
43 } // namespace blender::deg
void BKE_gpencil_data_update_orig_pointers(const struct bGPdata *gpd_orig, const struct bGPdata *gpd_eval)
void BKE_gpencil_free_update_cache(struct bGPdata *gpd)
#define UNUSED(x)
GPencilBackup(const Depsgraph *depsgraph)
const Depsgraph * depsgraph
struct ID * orig_id
Definition: DNA_ID.h:419
struct GPencilUpdateCache * update_cache
bGPdata_Runtime runtime