Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/eval/deg_eval_runtime_backup.cc
| Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
| void RuntimeBackup::init_from_id(ID *id) | void RuntimeBackup::init_from_id(ID *id) | ||||
| { | { | ||||
| if (!deg_copy_on_write_is_expanded(id)) { | if (!deg_copy_on_write_is_expanded(id)) { | ||||
| return; | return; | ||||
| } | } | ||||
| have_backup = true; | have_backup = true; | ||||
| /* Clear, so freeing the expanded data doesn't touch this Python reference. */ | |||||
| id_data.py_instance = id->py_instance; | id_data.py_instance = id->py_instance; | ||||
| id->py_instance = nullptr; | |||||
sergey: This is a good catch btw! | |||||
| animation_backup.init_from_id(id); | animation_backup.init_from_id(id); | ||||
| const ID_Type id_type = GS(id->name); | const ID_Type id_type = GS(id->name); | ||||
| switch (id_type) { | switch (id_type) { | ||||
| case ID_OB: | case ID_OB: | ||||
| object_backup.init_from_object(reinterpret_cast<Object *>(id)); | object_backup.init_from_object(reinterpret_cast<Object *>(id)); | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines | |||||
This is a good catch btw!