mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 03:37:21 +00:00
New annotations should not go into the unsorted collection
This commit is contained in:
@@ -425,7 +425,7 @@ def add_annotation(
|
|||||||
ifc_representation_class=drawing_tool.get_ifc_representation_class(object_type),
|
ifc_representation_class=drawing_tool.get_ifc_representation_class(object_type),
|
||||||
)
|
)
|
||||||
ifc.run("group.assign_group", group=drawing_tool.get_drawing_group(drawing), products=[element])
|
ifc.run("group.assign_group", group=drawing_tool.get_drawing_group(drawing), products=[element])
|
||||||
collector.assign(obj)
|
collector.assign(obj, should_clean_users_collection=True)
|
||||||
drawing_tool.enable_editing(obj)
|
drawing_tool.enable_editing(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ class Collector(bonsai.core.tool.Collector):
|
|||||||
for users_collection in obj.users_collection:
|
for users_collection in obj.users_collection:
|
||||||
if obj.BIMObjectProperties.collection == users_collection:
|
if obj.BIMObjectProperties.collection == users_collection:
|
||||||
continue
|
continue
|
||||||
# Users are free to user extra collections for their own
|
# Users are free to use extra collections for their own
|
||||||
# purposes except for the reserved keyword "Ifc" and
|
# purposes except for the reserved keyword "Ifc" and
|
||||||
# "Collection" (which is the default collection that comes with
|
# "Collection" (which is the default collection that comes with
|
||||||
# a Blender session)
|
# a Blender session) and "Unsorted" (our special collection).
|
||||||
if "Ifc" in users_collection.name or users_collection.name == "Collection":
|
if "Ifc" in users_collection.name or users_collection.name in ("Collection", "Unsorted"):
|
||||||
users_collection.objects.unlink(obj)
|
users_collection.objects.unlink(obj)
|
||||||
|
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user