Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
| Show First 20 Lines • Show All 772 Lines • ▼ Show 20 Lines | void update_id_after_copy(const Depsgraph *depsgraph, | ||||
| switch (type) { | switch (type) { | ||||
| case ID_OB: { | case ID_OB: { | ||||
| /* Ensure we don't drag someone's else derived mesh to the | /* Ensure we don't drag someone's else derived mesh to the | ||||
| * new copy of the object. */ | * new copy of the object. */ | ||||
| Object *object_cow = (Object *)id_cow; | Object *object_cow = (Object *)id_cow; | ||||
| const Object *object_orig = (const Object *)id_orig; | const Object *object_orig = (const Object *)id_orig; | ||||
| object_cow->mode = object_orig->mode; | object_cow->mode = object_orig->mode; | ||||
| object_cow->sculpt = object_orig->sculpt; | object_cow->sculpt = object_orig->sculpt; | ||||
| if (object_cow->type == OB_MESH) { | object_cow->runtime.data_orig = (ID *)object_cow->data; | ||||
| object_cow->runtime.mesh_orig = (Mesh *)object_cow->data; | |||||
| } | |||||
| if (object_cow->type == OB_ARMATURE) { | if (object_cow->type == OB_ARMATURE) { | ||||
| const bArmature *armature_orig = (bArmature *)object_orig->data; | const bArmature *armature_orig = (bArmature *)object_orig->data; | ||||
| bArmature *armature_cow = (bArmature *)object_cow->data; | bArmature *armature_cow = (bArmature *)object_cow->data; | ||||
| BKE_pose_remap_bone_pointers(armature_cow, object_cow->pose); | BKE_pose_remap_bone_pointers(armature_cow, object_cow->pose); | ||||
| if (armature_orig->edbo == NULL) { | if (armature_orig->edbo == NULL) { | ||||
| update_pose_orig_pointers(object_orig->pose, object_cow->pose); | update_pose_orig_pointers(object_orig->pose, object_cow->pose); | ||||
| } | } | ||||
| BKE_pose_pchan_index_rebuild(object_cow->pose); | BKE_pose_pchan_index_rebuild(object_cow->pose); | ||||
| ▲ Show 20 Lines • Show All 323 Lines • Show Last 20 Lines | |||||