Blender
V4.3
source
blender
blenkernel
intern
lib_id_eval.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
12
#include "
DNA_ID.h
"
13
#include "
DNA_mesh_types.h
"
14
15
#include "
BLI_utildefines.h
"
16
17
#include "
BKE_lib_id.hh
"
18
#include "
BKE_mesh.hh
"
19
20
void
BKE_id_eval_properties_copy
(
ID
*id_cow,
ID
*
id
)
21
{
22
const
ID_Type
id_type =
GS
(id->name);
23
BLI_assert
((id_cow->
tag
&
ID_TAG_COPIED_ON_EVAL
) && !(id->tag &
ID_TAG_COPIED_ON_EVAL
));
24
BLI_assert
(
ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW
(id_type));
25
if
(id_type ==
ID_ME
) {
26
BKE_mesh_copy_parameters
((
Mesh
*)id_cow, (
const
Mesh
*)
id
);
27
}
28
else
{
29
BLI_assert_unreachable
();
30
}
31
}
BKE_lib_id.hh
BKE_mesh_copy_parameters
void BKE_mesh_copy_parameters(Mesh *me_dst, const Mesh *me_src)
Definition
blenkernel/intern/mesh.cc:756
BKE_mesh.hh
BLI_assert_unreachable
#define BLI_assert_unreachable()
Definition
BLI_assert.h:97
BLI_assert
#define BLI_assert(a)
Definition
BLI_assert.h:50
BLI_utildefines.h
DNA_ID.h
ID and Library types, which are fundamental for SDNA.
ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW
#define ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW(id_type)
Definition
DNA_ID.h:698
ID_TAG_COPIED_ON_EVAL
@ ID_TAG_COPIED_ON_EVAL
Definition
DNA_ID.h:964
ID_Type
ID_Type
Definition
DNA_ID_enums.h:117
ID_ME
@ ID_ME
Definition
DNA_ID_enums.h:121
DNA_mesh_types.h
GS
#define GS(x)
Definition
iris.cc:202
BKE_id_eval_properties_copy
void BKE_id_eval_properties_copy(ID *id_cow, ID *id)
Definition
lib_id_eval.cc:20
ID
Definition
DNA_ID.h:413
ID::tag
int tag
Definition
DNA_ID.h:434
Mesh
Definition
DNA_mesh_types.h:56
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0