Fix T62929: Linked To Scene Object cannot be made single user.
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 26 Mar 2019 13:30:45 +0000 (14:30 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 26 Mar 2019 13:41:37 +0000 (14:41 +0100)
Code was still 2.7x one here, Object's IDtemplate in properties editor
is now based on current view layer's collection of objects, not scene's
one anymore.

source/blender/editors/interface/interface_templates.c

index 3b52984df3efb7975081262660cd013f9054ed90..213c9df4b2996e86f5d0197a10ec5325f9b9599d 100644 (file)
@@ -501,15 +501,14 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
                        if (id) {
                                const bool do_scene_obj = (
                                        (GS(id->name) == ID_OB) &&
-                                       (template_ui->ptr.type == &RNA_SceneObjects));
+                                       (template_ui->ptr.type == &RNA_LayerObjects));
 
                                /* make copy */
                                if (do_scene_obj) {
                                        Main *bmain = CTX_data_main(C);
                                        Scene *scene = CTX_data_scene(C);
                                        ED_object_single_user(bmain, scene, (struct Object *)id);
-                                       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
-                                       WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
+                                       WM_event_add_notifier(C, NC_WINDOW, NULL);
                                        DEG_relations_tag_update(bmain);
                                }
                                else {