Blender V5.0
deg_eval_copy_on_write.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2017 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <cstddef>
12
13#include "DNA_ID.h"
14
15struct ID;
16struct Depsgraph;
17
18/* Uncomment this to have verbose log about original and evaluated pointers
19 * logged, with detailed information when they are allocated, expanded
20 * and remapped.
21 */
22// #define DEG_DEBUG_COW_POINTERS
23
24#ifdef DEG_DEBUG_COW_POINTERS
25# define DEG_COW_PRINT(format, ...) printf(format, __VA_ARGS__);
26#else
27# define DEG_COW_PRINT(format, ...)
28#endif
29
30namespace blender::deg {
31
32struct Depsgraph;
33class DepsgraphNodeBuilder;
34struct IDNode;
35
41ID *deg_update_eval_copy_datablock(const struct Depsgraph *depsgraph, struct ID *id_orig);
42
44void deg_free_eval_copy_datablock(struct ID *id_cow);
45
50void deg_create_eval_copy(struct ::Depsgraph *depsgraph, const struct IDNode *id_node);
51
57
59void deg_tag_eval_copy_id(Depsgraph &depsgraph, struct ID *id_cow, const struct ID *id_orig);
60
66bool deg_eval_copy_is_expanded(const struct ID *id_cow);
67
76bool deg_eval_copy_is_needed(const ID *id_orig);
77bool deg_eval_copy_is_needed(const ID_Type id_type);
78
79} // namespace blender::deg
ID and Library types, which are fundamental for SDNA.
ID_Type
BPy_StructRNA * depsgraph
void deg_tag_eval_copy_id(deg::Depsgraph &depsgraph, ID *id_cow, const ID *id_orig)
void deg_create_eval_copy(::Depsgraph *graph, const IDNode *id_node)
bool deg_eval_copy_is_expanded(const ID *id_cow)
void deg_free_eval_copy_datablock(ID *id_cow)
bool deg_eval_copy_is_needed(const ID *id_orig)
ID * deg_update_eval_copy_datablock(const Depsgraph *depsgraph, const IDNode *id_node)
bool deg_validate_eval_copy_datablock(ID *id_cow)
Definition DNA_ID.h:414