Add a more useful error message when no clashes are loaded for the given clashset

This commit is contained in:
Vincent Cadoret
2020-11-06 21:41:11 -05:00
committed by Dion Moult
parent 1921b4cecf
commit 51dca4329c
@@ -1865,6 +1865,9 @@ class SelectIfcClashResults(bpy.types.Operator):
for clash_set in clash_sets:
if clash_set["name"] != clash_set_name:
continue
if not "clashes" in clash_set.keys():
self.report({"WARNING"}, "No clashes found for the selected Clash Set.")
return {"CANCELLED"}
for clash in clash_set["clashes"].values():
global_ids.extend([clash["a_global_id"], clash["b_global_id"]])
for obj in bpy.context.visible_objects: