Skip to content

Commit 4bc9879

Browse files
committed
enable activating object type when trying to select type from an object ( whilst the type is hidden from view layer)
1 parent f26cfc9 commit 4bc9879

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/blenderbim/blenderbim/bim/module/type/operator.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,10 @@ class SelectType(bpy.types.Operator):
141141

142142
def execute(self, context):
143143
element = tool.Ifc.get().by_id(self.relating_type)
144+
tool.Spatial.select_products([element])
144145
obj = tool.Ifc.get_object(element)
145146
if obj:
146-
if obj in context.selectable_objects:
147-
tool.Blender.select_and_activate_single_object(context, obj)
148-
else:
149-
self.report({"INFO"}, "Type object can't be selected : It may be hidden or in an excluded collection.")
150-
context.scene.BIMModelProperties.ifc_class = element.is_a()
151-
context.scene.BIMModelProperties.relating_type_id = str(self.relating_type)
147+
context.view_layer.objects.active = obj
152148
return {"FINISHED"}
153149

154150

0 commit comments

Comments
 (0)