Blender
V4.5
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
11
12
#include "
DNA_ID.h
"
13
#include "
DNA_mesh_types.h
"
14
15
#include "
BKE_lib_id.hh
"
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
&
ID_TAG_COPIED_ON_EVAL
) && !(id->
tag
&
ID_TAG_COPIED_ON_EVAL
));
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.hh
BKE_mesh.h
BKE_mesh_copy_parameters
void BKE_mesh_copy_parameters(Mesh *me_dst, const Mesh *me_src)
Definition
blenkernel/intern/mesh.cc:914
BLI_assert_unreachable
#define BLI_assert_unreachable()
Definition
BLI_assert.h:93
BLI_assert
#define BLI_assert(a)
Definition
BLI_assert.h:46
DNA_ID.h
ID and Library types, which are fundamental for SDNA.
ID_TAG_COPIED_ON_EVAL
@ ID_TAG_COPIED_ON_EVAL
Definition
DNA_ID.h:905
ID_Type
ID_Type
Definition
DNA_ID_enums.h:122
ID_ME
@ ID_ME
Definition
DNA_ID_enums.h:126
DNA_mesh_types.h
ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW
#define ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW(id_type)
GS
#define GS(a)
BKE_id_eval_properties_copy
void BKE_id_eval_properties_copy(ID *id_cow, ID *id)
Definition
lib_id_eval.cc:18
ID
Definition
DNA_ID.h:404
ID::tag
int tag
Definition
DNA_ID.h:424
ID::name
char name[66]
Definition
DNA_ID.h:415
Mesh
Definition
DNA_mesh_types.h:59
Generated on
for Blender by
doxygen
1.15.0