diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-12-07 03:04:12 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-12-07 03:06:05 +0300 |
commit | 3cce7b7ab922392ce50037f5f3efefa8784f03b0 (patch) | |
tree | 28d1fb74e46ce1cfdb91fa3be2595bcdc40401d6 | |
parent | d40bffa17f6dabac3f4aef229d11824c2554bba3 (diff) |
Fix T58325: Local view Bug
Aka all the thousand of reports duplicated here.
I should have seen this coming, since I had to add a hack in the first
place because things were "not working".
I should have figured out earlier that COW handles base in a really
special way, with its own special object_runtime_backup hack.
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 3 |
2 files changed, 3 insertions, 3 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 98e1bf49c5d..f8754c530a0 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 @@ -812,6 +812,7 @@ static void deg_update_copy_on_write_animation(const Depsgraph *depsgraph, typedef struct ObjectRuntimeBackup { Object_Runtime runtime; short base_flag; + unsigned short base_local_view_bits; } ObjectRuntimeBackup; /* Make a backup of object's evaluation runtime data, additionally @@ -835,6 +836,7 @@ static void deg_backup_object_runtime( } /* Make a backup of base flags. */ object_runtime_backup->base_flag = object->base_flag; + object_runtime_backup->base_local_view_bits = object->base_local_view_bits; } static void deg_restore_object_runtime( @@ -872,6 +874,7 @@ static void deg_restore_object_runtime( } } object->base_flag = object_runtime_backup->base_flag; + object->base_local_view_bits = object_runtime_backup->base_local_view_bits; } ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph, diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 98ae57e9c42..1cced23b24d 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1188,9 +1188,6 @@ static bool view3d_localview_init( if (TESTBASE(v3d, base)) { BKE_object_minmax(base->object, min, max, false); base->local_view_bits |= local_view_bit; - /* Technically we should leave for Depsgraph to handle this. - But it is harmless to do it here, and it seems to be necessary. */ - base->object->base_local_view_bits = base->local_view_bits; ok = true; } } |