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