Blender V4.3
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
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));
25 if (id_type == ID_ME) {
26 BKE_mesh_copy_parameters((Mesh *)id_cow, (const Mesh *)id);
27 }
28 else {
30 }
31}
void BKE_mesh_copy_parameters(Mesh *me_dst, const Mesh *me_src)
#define BLI_assert_unreachable()
Definition BLI_assert.h:97
#define BLI_assert(a)
Definition BLI_assert.h:50
ID and Library types, which are fundamental for SDNA.
#define ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW(id_type)
Definition DNA_ID.h:698
@ ID_TAG_COPIED_ON_EVAL
Definition DNA_ID.h:964
ID_Type
@ ID_ME
#define GS(x)
Definition iris.cc:202
void BKE_id_eval_properties_copy(ID *id_cow, ID *id)
Definition DNA_ID.h:413
int tag
Definition DNA_ID.h:434