Initial 'fix' for Sculpt & COW - shallow copy sculpt data into COWed object.

Still a lot to fix here, right now you can get sculpt drawing updating
when you come from Edit mode, not from Object mode... Go figure...
This commit is contained in:
Bastien Montagne 2018-05-30 15:13:24 +02:00
parent 35a6d9ec55
commit 30fb455977
1 changed files with 2 additions and 1 deletions

View File

@ -527,10 +527,10 @@ void update_special_pointers(const Depsgraph *depsgraph,
*/
Object *object_cow = (Object *)id_cow;
const Object *object_orig = (const Object *)id_orig;
(void) object_cow; /* Ignored for release builds. */
BLI_assert(object_cow->derivedFinal == NULL);
BLI_assert(object_cow->derivedDeform == NULL);
object_cow->mode = object_orig->mode;
object_cow->sculpt = object_orig->sculpt;
if (object_cow->type == OB_ARMATURE) {
BKE_pose_remap_bone_pointers((bArmature *)object_cow->data,
object_cow->pose);
@ -937,6 +937,7 @@ void deg_free_copy_on_write_datablock(ID *id_cow)
*/
Object *ob_cow = (Object *)id_cow;
ob_cow->data = NULL;
ob_cow->sculpt = NULL;
break;
}
default: