Blender
V3.3
source
blender
blenkernel
intern
lib_id_eval.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
10
#include "
DNA_ID.h
"
11
#include "
DNA_mesh_types.h
"
12
13
#include "
BLI_utildefines.h
"
14
15
#include "
BKE_lib_id.h
"
16
#include "
BKE_mesh.h
"
17
18
void
BKE_id_eval_properties_copy
(
ID
*id_cow,
ID
*
id
)
19
{
20
const
ID_Type
id_type =
GS
(
id
->
name
);
21
BLI_assert
((id_cow->
tag
&
LIB_TAG_COPIED_ON_WRITE
) && !(
id
->
tag
&
LIB_TAG_COPIED_ON_WRITE
));
22
BLI_assert
(
ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW
(id_type));
23
if
(id_type ==
ID_ME
) {
24
BKE_mesh_copy_parameters
((
Mesh
*)id_cow, (
const
Mesh
*)
id
);
25
}
26
else
{
27
BLI_assert_unreachable
();
28
}
29
}
BKE_lib_id.h
BKE_mesh.h
BKE_mesh_copy_parameters
void BKE_mesh_copy_parameters(struct Mesh *me_dst, const struct Mesh *me_src)
BLI_assert_unreachable
#define BLI_assert_unreachable()
Definition:
BLI_assert.h:93
BLI_assert
#define BLI_assert(a)
Definition:
BLI_assert.h:46
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:606
LIB_TAG_COPIED_ON_WRITE
@ LIB_TAG_COPIED_ON_WRITE
Definition:
DNA_ID.h:720
ID_Type
ID_Type
Definition:
DNA_ID_enums.h:44
ID_ME
@ ID_ME
Definition:
DNA_ID_enums.h:48
DNA_mesh_types.h
id
ID * id
Definition:
deg_eval_runtime_backup_animation.cc:28
GS
#define GS(x)
Definition:
iris.c:225
BKE_id_eval_properties_copy
void BKE_id_eval_properties_copy(ID *id_cow, ID *id)
Definition:
lib_id_eval.c:18
ID
Definition:
DNA_ID.h:368
ID::tag
int tag
Definition:
DNA_ID.h:387
ID::name
char name[66]
Definition:
DNA_ID.h:378
Mesh
Definition:
DNA_mesh_types.h:151
Generated on Sat Jul 27 2024 14:57:55 for Blender by
doxygen
1.9.1