mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
hide non-ifc objects from relating product dropdown
This commit is contained in:
@@ -541,9 +541,15 @@ class BIMTextProperties(PropertyGroup):
|
||||
return text_data
|
||||
|
||||
|
||||
def relating_product_poll(self: "BIMAssignedProductProperties", obj: bpy.types.Object) -> bool:
|
||||
if not tool.Ifc.get_entity(obj):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
class BIMAssignedProductProperties(PropertyGroup):
|
||||
is_editing_product: BoolProperty(name="Is Editing Product", default=False)
|
||||
relating_product: PointerProperty(name="Relating Product", type=bpy.types.Object)
|
||||
relating_product: PointerProperty(name="Relating Product", type=bpy.types.Object, poll=relating_product_poll)
|
||||
|
||||
|
||||
annotation_classes = [
|
||||
|
||||
Reference in New Issue
Block a user