Fix #105316: Error import dxf in scene collection

Exclude the case of scene collection when importing to selected collection.

Pull Request: https://projects.blender.org/blender/blender-addons/pulls/105317
This commit is contained in:
RobLop
2024-05-08 12:56:07 +02:00
committed by Sebastian Sille
parent 6fe582b52e
commit 8127d2e925

View File

@ -570,7 +570,7 @@ class IMPORT_OT_dxf(bpy.types.Operator):
collection = scene.collection
case _:
collection = bpy.context.collection
if collection.name not in scene.collection.children: scene.collection.children.link(collection)
if collection != scene.collection and collection.name not in scene.collection.children: scene.collection.children.link(collection)
if RELEASE_TEST:
# for release testing