Blender V5.0
deg_eval_copy_on_write.cc File Reference
#include "intern/eval/deg_eval_copy_on_write.h"
#include <cstring>
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_curve.hh"
#include "BKE_global.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_scene.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "MEM_guardedalloc.h"
#include "DNA_ID.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DRW_engine.hh"
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
#include "DNA_light_types.h"
#include "DNA_linestyle_types.h"
#include "DNA_material_types.h"
#include "DNA_meta_types.h"
#include "DNA_node_types.h"
#include "DNA_texture_types.h"
#include "DNA_world_types.h"
#include "BKE_anim_data.hh"
#include "BKE_animsys.h"
#include "BKE_armature.hh"
#include "BKE_editmesh.hh"
#include "BKE_lib_query.hh"
#include "BKE_mesh_types.hh"
#include "BKE_modifier.hh"
#include "BKE_object.hh"
#include "BKE_pointcache.h"
#include "BKE_sound.h"
#include "SEQ_relations.hh"
#include "intern/builder/deg_builder.h"
#include "intern/builder/deg_builder_nodes.h"
#include "intern/depsgraph.hh"
#include "intern/eval/deg_eval_runtime_backup.h"
#include "intern/node/deg_node.hh"
#include "intern/node/deg_node_id.hh"

Go to the source code of this file.

Namespaces

namespace  blender
namespace  blender::deg

Macros

#define NESTED_ID_NASTY_WORKAROUND
#define DNA_DEPRECATED_ALLOW
#define DEBUG_PRINT
#define SPECIAL_CASE(id_type, dna_type, field)
#define SPECIAL_CASE(id_type, dna_type, field, variable)
#define SPECIAL_CASE(id_type, dna_type, field)
#define SPECIAL_CASE(id_type, dna_type, field, field_type)

Functions

IDblender::deg::deg_update_eval_copy_datablock (const Depsgraph *depsgraph, const IDNode *id_node)
IDblender::deg::deg_update_eval_copy_datablock (const Depsgraph *depsgraph, ID *id_orig)
void blender::deg::deg_free_eval_copy_datablock (ID *id_cow)
void blender::deg::deg_create_eval_copy (::Depsgraph *graph, const IDNode *id_node)
bool blender::deg::deg_validate_eval_copy_datablock (ID *id_cow)
void blender::deg::deg_tag_eval_copy_id (deg::Depsgraph &depsgraph, ID *id_cow, const ID *id_orig)
bool blender::deg::deg_eval_copy_is_expanded (const ID *id_cow)
bool blender::deg::deg_eval_copy_is_needed (const ID *id_orig)
bool blender::deg::deg_eval_copy_is_needed (const ID_Type id_type)

Macro Definition Documentation

◆ DEBUG_PRINT

#define DEBUG_PRINT
Value:
if (G.debug & G_DEBUG_DEPSGRAPH_EVAL) \
@ G_DEBUG_DEPSGRAPH_EVAL
#define printf(...)
#define G(x, y, z)

Definition at line 83 of file deg_eval_copy_on_write.cc.

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 17 of file deg_eval_copy_on_write.cc.

◆ NESTED_ID_NASTY_WORKAROUND

#define NESTED_ID_NASTY_WORKAROUND

Definition at line 14 of file deg_eval_copy_on_write.cc.

◆ SPECIAL_CASE [1/4]

#define SPECIAL_CASE ( id_type,
dna_type,
field )
Value:
case id_type: { \
((dna_type *)(new_id))->field = ((dna_type *)(old_id))->field; \
break; \
}

◆ SPECIAL_CASE [2/4]

#define SPECIAL_CASE ( id_type,
dna_type,
field )
Value:
case id_type: { \
((dna_type *)id_cow)->field = nullptr; \
break; \
}

◆ SPECIAL_CASE [3/4]

#define SPECIAL_CASE ( id_type,
dna_type,
field,
field_type )
Value:
case id_type: { \
dna_type *data = (dna_type *)id_cow; \
if (data->field != nullptr) { \
ID *ntree_id_cow = depsgraph->get_cow_id(&data->field->id); \
if (ntree_id_cow != nullptr) { \
DEG_COW_PRINT(" Remapping datablock for %s: id_orig=%p id_cow=%p\n", \
data->field->id.name, \
data->field, \
ntree_id_cow); \
data->field = (field_type *)ntree_id_cow; \
} \
} \
break; \
}
BMesh const char void * data
BPy_StructRNA * depsgraph
Definition DNA_ID.h:414

◆ SPECIAL_CASE [4/4]

#define SPECIAL_CASE ( id_type,
dna_type,
field,
variable )
Value:
case id_type: { \
storage->variable = dna::shallow_copy(*(dna_type *)id); \
storage->variable.field = nullptr; \
return &storage->variable.id; \
}