Using the eyedropper on a type automatically sets the type and validates assign_type. However it does display an annoying message saying the value was not set, I don't know how to get rid of it.

This commit is contained in:
Gorgious
2023-05-23 21:39:16 +02:00
parent bb2ee957e9
commit e6a90d6786
@@ -52,15 +52,17 @@ def update_relating_type_class(self, context):
def update_relating_type_from_object(self, context):
if self.relating_type_object is None:
obj = self.relating_type_object
if obj is None:
return
element = tool.Ifc.get_entity(self.relating_type_object)
element = tool.Ifc.get_entity(obj)
if not element:
return
element_type = ifcopenshell.util.element.get_type(element)
if not element_type:
return
self.relating_type = str(element_type.id())
bpy.ops.bim.assign_type()
def is_object_class_applicable(self, obj):