diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-30 17:54:40 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-07-30 17:58:44 +0300 |
commit | a3b6ae9fb9dd76538ec04b9fa6953490d321dd32 (patch) | |
tree | 0bce9a5d00551e94b15e5195c7a80370ff6f788f /source/blender/depsgraph | |
parent | 6d6deeb70086564418368a5213cd9d28cdfa51e2 (diff) |
Cleanup/Refactor: Move CurveCache runtime data into Object.runtime struct.
Also, fix missing cleanup of Object.runtime when copying Object
datablocks!
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index 20aec0ba5ed..b5b33900105 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -732,7 +732,7 @@ static void deg_backup_object_runtime( Object *object, ObjectRuntimeBackup *object_runtime_backup) { - /* Store evaluated mesh, and make sure we don't free it. */ + /* Store evaluated mesh and curve_cache, and make sure we don't free it. */ Mesh *mesh_eval = object->runtime.mesh_eval; object_runtime_backup->runtime = object->runtime; BKE_object_runtime_reset(object); @@ -743,9 +743,6 @@ static void deg_backup_object_runtime( if (mesh_eval != NULL && object->data == mesh_eval) { object->data = object->runtime.mesh_orig; } - /* Store curve cache and make sure we don't free it. */ - object_runtime_backup->curve_cache = object->curve_cache; - object->curve_cache = NULL; /* Make a backup of base flags. */ object_runtime_backup->base_flag = object->base_flag; } @@ -783,9 +780,6 @@ static void deg_restore_object_runtime( } } } - if (object_runtime_backup->curve_cache != NULL) { - object->curve_cache = object_runtime_backup->curve_cache; - } object->base_flag = object_runtime_backup->base_flag; } |