mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 06:09:16 +00:00
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:
@@ -52,15 +52,17 @@ def update_relating_type_class(self, context):
|
|||||||
|
|
||||||
|
|
||||||
def update_relating_type_from_object(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
|
return
|
||||||
element = tool.Ifc.get_entity(self.relating_type_object)
|
element = tool.Ifc.get_entity(obj)
|
||||||
if not element:
|
if not element:
|
||||||
return
|
return
|
||||||
element_type = ifcopenshell.util.element.get_type(element)
|
element_type = ifcopenshell.util.element.get_type(element)
|
||||||
if not element_type:
|
if not element_type:
|
||||||
return
|
return
|
||||||
self.relating_type = str(element_type.id())
|
self.relating_type = str(element_type.id())
|
||||||
|
bpy.ops.bim.assign_type()
|
||||||
|
|
||||||
|
|
||||||
def is_object_class_applicable(self, obj):
|
def is_object_class_applicable(self, obj):
|
||||||
|
|||||||
Reference in New Issue
Block a user