Blender V4.3
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
9#pragma once
10
11#include <stddef.h>
12
13#include "DNA_ID.h"
14
15struct ID;
16
17/* Uncomment this to have verbose log about original and evaluated pointers
18 * logged, with detailed information when they are allocated, expanded
19 * and remapped.
20 */
21// #define DEG_DEBUG_COW_POINTERS
22
23#ifdef DEG_DEBUG_COW_POINTERS
24# define DEG_COW_PRINT(format, ...) printf(format, __VA_ARGS__);
25#else
26# define DEG_COW_PRINT(format, ...)
27#endif
28
29struct Depsgraph;
30
31namespace blender::deg {
32
33struct Depsgraph;
34class DepsgraphNodeBuilder;
35struct IDNode;
36
42ID *deg_update_eval_copy_datablock(const struct Depsgraph *depsgraph, struct ID *id_orig);
43
45void deg_free_eval_copy_datablock(struct ID *id_cow);
46
51void deg_create_eval_copy(struct ::Depsgraph *depsgraph, const struct IDNode *id_node);
52
58
60void deg_tag_eval_copy_id(Depsgraph &depsgraph, struct ID *id_cow, const struct ID *id_orig);
61
67bool deg_eval_copy_is_expanded(const struct ID *id_cow);
68
77bool deg_eval_copy_is_needed(const ID *id_orig);
78bool deg_eval_copy_is_needed(const ID_Type id_type);
79
80} // namespace blender::deg
ID and Library types, which are fundamental for SDNA.
ID_Type
const IDNode * id_node
const Depsgraph * 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:413