From 98aa94f8dbdec9b71d2b102e799a0216de52bbe2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne <montagne29@wanadoo.fr> Date: Mon, 5 Nov 2018 17:50:52 +0100 Subject: [PATCH] OBJ import: fix (remove) deprecated viewlayer handling code. Guess that was added when layercollection of view layer could still be edited, that is no more the case (reading code), now view layers appear to always only have the scene's master collection, all others being children of that one. --- io_scene_obj/import_obj.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index d308b649e..84ea3706b 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -1179,11 +1179,7 @@ def load(context, create_nurbs(context_nurbs, verts_loc, new_objects) view_layer = context.view_layer - if view_layer.collections.active: - collection = view_layer.collections.active.collection - else: - collection = scene.master_collection.new() - view_layer.collections.link(collection) + collection = view_layer.collections.active.collection # Create new obj for obj in new_objects: -- GitLab