mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-13 06:53:36 +00:00
Fix #3471. Allow to select hidden types (except if the type is excluded).
This commit is contained in:
@@ -143,14 +143,18 @@ class SelectType(bpy.types.Operator):
|
|||||||
element = tool.Ifc.get().by_id(self.relating_type)
|
element = tool.Ifc.get().by_id(self.relating_type)
|
||||||
obj = tool.Ifc.get_object(element)
|
obj = tool.Ifc.get_object(element)
|
||||||
if obj:
|
if obj:
|
||||||
if obj in context.selectable_objects:
|
try:
|
||||||
tool.Blender.select_and_activate_single_object(context, obj)
|
tool.Blender.select_and_activate_single_object(context, obj)
|
||||||
else:
|
except:
|
||||||
self.report({"INFO"}, "Type object can't be selected : It may be hidden or in an excluded collection.")
|
self.report({"INFO"}, "Type object is hidden.")
|
||||||
# IfcTypeProducts are only used for annotations and not part of the model interface.
|
# IfcTypeProducts are only used for annotations and not part of the model interface.
|
||||||
if element.is_a() != "IfcTypeProduct":
|
if element.is_a() != "IfcTypeProduct":
|
||||||
context.scene.BIMModelProperties.ifc_class = element.is_a()
|
try:
|
||||||
context.scene.BIMModelProperties.relating_type_id = str(self.relating_type)
|
context.scene.BIMModelProperties.ifc_class = element.is_a()
|
||||||
|
context.scene.BIMModelProperties.relating_type_id = str(self.relating_type)
|
||||||
|
except:
|
||||||
|
# Potentially our BIM Tool is filtered to a specific element.
|
||||||
|
pass
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user