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.
This commit is contained in:
parent
4207e249e5
commit
98aa94f8db
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue