Revert "enable activating object type when trying to select type from an object ( whilst the type is hidden from view layer)"

This reverts commit 4bc987924d since there was some unintentional changes.

Now when you use select_type in object properties - ifc class and related type gets selected in the BIM Tool  - https://i.imgur.com/drIHYDz.png

#3318
This commit is contained in:
Andrej730
2023-07-05 14:51:07 +05:00
parent 9fbcb3900f
commit ca8ed87f2a
@@ -141,10 +141,14 @@ class SelectType(bpy.types.Operator):
def execute(self, context):
element = tool.Ifc.get().by_id(self.relating_type)
tool.Spatial.select_products([element])
obj = tool.Ifc.get_object(element)
if obj:
context.view_layer.objects.active = obj
if obj in context.selectable_objects:
tool.Blender.select_and_activate_single_object(context, obj)
else:
self.report({"INFO"}, "Type object can't be selected : It may be hidden or in an excluded collection.")
context.scene.BIMModelProperties.ifc_class = element.is_a()
context.scene.BIMModelProperties.relating_type_id = str(self.relating_type)
return {"FINISHED"}