Depsgraph: Keep edit bones around, fixes missing edit mode with copy on write

This commit is contained in:
Sergey Sharybin 2018-05-03 16:22:47 +02:00
parent 14f2a1c8e8
commit bb92edd1c8
Notes: blender-bot 2023-02-14 04:40:22 +01:00
Referenced by commit c350d97a2f, Fix T101046: missing DEG update changing bone layers in editmode
1 changed files with 14 additions and 0 deletions

View File

@ -63,6 +63,7 @@
extern "C" {
#include "DNA_ID.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_mesh_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
@ -426,6 +427,13 @@ void update_special_pointers(const Depsgraph *depsgraph,
}
break;
}
case ID_AR:
{
const bArmature *armature_orig = (const bArmature *)id_orig;
bArmature *armature_cow = (bArmature *)id_cow;
armature_cow->edbo = armature_orig->edbo;
break;
}
case ID_ME:
{
/* For meshes we need to update edit_btmesh to make it to point
@ -755,6 +763,12 @@ void deg_free_copy_on_write_datablock(ID *id_cow)
ob_cow->data = NULL;
break;
}
case ID_AR:
{
bArmature *armature_cow = (bArmature *)id_cow;
armature_cow->edbo = NULL;
break;
}
case ID_ME:
{
Mesh *mesh_cow = (Mesh *)id_cow;