mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
enable activating object type when trying to select type from an object ( whilst the type is hidden from view layer)
This commit is contained in:
@@ -141,14 +141,10 @@ class SelectType(bpy.types.Operator):
|
|||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
element = tool.Ifc.get().by_id(self.relating_type)
|
element = tool.Ifc.get().by_id(self.relating_type)
|
||||||
|
tool.Spatial.select_products([element])
|
||||||
obj = tool.Ifc.get_object(element)
|
obj = tool.Ifc.get_object(element)
|
||||||
if obj:
|
if obj:
|
||||||
if obj in context.selectable_objects:
|
context.view_layer.objects.active = obj
|
||||||
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"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user