Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-11-05 19:50:52 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-11-05 19:54:55 +0300
commit98aa94f8dbdec9b71d2b102e799a0216de52bbe2 (patch)
tree09665a730fd0906f1bcacff84a6db39aa1c5a21a /io_scene_obj/import_obj.py
parent4207e249e539549ac3215619909d1c5b390b6e8e (diff)
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.
Diffstat (limited to 'io_scene_obj/import_obj.py')
-rw-r--r--io_scene_obj/import_obj.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index d308b649..84ea3706 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: