Fix T55126: COW problem: there is an active object even if unselectable
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Jun 2018 14:30:19 +0000 (16:30 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Jun 2018 14:31:10 +0000 (16:31 +0200)
source/blender/blenkernel/intern/layer.c
source/blender/blenkernel/intern/object_update.c

index 16e349465f606ac627d96bb619b33d997dd5634a..c7bb24cdcee8a9b3166dcda44cb074d7509caa88 100644 (file)
@@ -1264,6 +1264,16 @@ void BKE_layer_eval_view_layer(
                /* Store base in the array. */
                view_layer->object_bases_array[base_index++] = base;
        }
                /* Store base in the array. */
                view_layer->object_bases_array[base_index++] = base;
        }
+       if (view_layer == DEG_get_evaluated_view_layer(depsgraph)) {
+               ViewLayer *view_layer_orig = DEG_get_input_view_layer(depsgraph);
+               Base *base_orig = view_layer_orig->object_bases.first;
+               const Base *base_eval = view_layer->object_bases.first;
+               while (base_orig != NULL) {
+                       base_orig->flag = base_eval->flag;
+                       base_orig = base_orig->next;
+                       base_eval = base_eval->next;
+               }
+       }
 }
 
 void BKE_layer_eval_view_layer_indexed(
 }
 
 void BKE_layer_eval_view_layer_indexed(
index 852d8197a6c5e3113e5c389702799247dadf565a..3b684ebfd94cd1b216e92deaa20fe76521904f97 100644 (file)
@@ -145,6 +145,7 @@ void BKE_object_eval_done(Depsgraph *depsgraph, Object *ob)
                Object *ob_orig = DEG_get_original_object(ob);
                copy_m4_m4(ob_orig->obmat, ob->obmat);
                ob_orig->transflag = ob->transflag;
                Object *ob_orig = DEG_get_original_object(ob);
                copy_m4_m4(ob_orig->obmat, ob->obmat);
                ob_orig->transflag = ob->transflag;
+               ob_orig->flag = ob->flag;
        }
 }
 
        }
 }