mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
bsdd - check keyword length only in tool
just to make it more straightforward and remove unused output
This commit is contained in:
@@ -47,8 +47,6 @@ def load_bsdd(client: bsdd.Client, bsdd: tool.Bsdd) -> None:
|
||||
|
||||
def search_class(keyword: str, client: bsdd.Client, bsdd: tool.Bsdd) -> int:
|
||||
bsdd.clear_classes()
|
||||
if len(keyword) < 3:
|
||||
return 0
|
||||
related_entities = bsdd.get_related_ifc_entities(keyword)
|
||||
active_dictionary_uri = bsdd.get_active_dictionary_uri()
|
||||
classes = bsdd.search_class(client, keyword, [active_dictionary_uri], related_entities)
|
||||
|
||||
@@ -112,10 +112,8 @@ class Bsdd(blenderbim.core.tool.Bsdd):
|
||||
def get_related_ifc_entities(cls, keyword: str) -> list[str]:
|
||||
active_object = bpy.context.active_object
|
||||
related_ifc_entities = []
|
||||
# TODO: keyword length seems to be already double-checked in core.
|
||||
# And {"FINISHED"} return value is never used.
|
||||
if len(keyword) < 3:
|
||||
return {"FINISHED"}
|
||||
return []
|
||||
if cls.should_filter_ifc_class() and active_object:
|
||||
element = tool.Ifc.get_entity(active_object)
|
||||
if element:
|
||||
|
||||
Reference in New Issue
Block a user