[Bf-extensions-cvs] [98aa94f8] blender2.8: OBJ import: fix (remove) deprecated viewlayer handling code.
Bastien Montagne
noreply at git.blender.org
Mon Nov 5 17:55:07 CET 2018
Commit: 98aa94f8dbdec9b71d2b102e799a0216de52bbe2
Author: Bastien Montagne
Date: Mon Nov 5 17:50:52 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBA98aa94f8dbdec9b71d2b102e799a0216de52bbe2
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.
===================================================================
M io_scene_obj/import_obj.py
===================================================================
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:
More information about the Bf-extensions-cvs
mailing list