mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Sync ifc class in BIM Tool and Type Manager
It's seems it would be better for ux if they will be connected
This commit is contained in:
@@ -69,6 +69,10 @@ def update_type_class(self, context):
|
||||
AuthoringData.data["paginated_relating_types"] = AuthoringData.paginated_relating_types()
|
||||
AuthoringData.data["type_predefined_type"] = AuthoringData.type_predefined_type()
|
||||
|
||||
type_class = self.type_class
|
||||
if (type_class, type_class, "") in get_ifc_class(self, context):
|
||||
self.ifc_class = type_class
|
||||
|
||||
|
||||
def update_relating_type_id(self, context):
|
||||
AuthoringData.data["relating_type_id"] = AuthoringData.relating_type_id()
|
||||
|
||||
@@ -205,6 +205,7 @@ class AddType(bpy.types.Operator, tool.Ifc.Operator):
|
||||
ifc_file = tool.Ifc.get()
|
||||
body = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW")
|
||||
if not body:
|
||||
props.type_class = props.type_class
|
||||
return {"FINISHED"}
|
||||
|
||||
if template == "MESH":
|
||||
@@ -415,6 +416,7 @@ class AddType(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bpy.ops.bim.add_roof()
|
||||
|
||||
bpy.ops.bim.load_type_thumbnails(ifc_class=ifc_class)
|
||||
props.type_class = props.type_class
|
||||
return {"FINISHED"}
|
||||
|
||||
def add_default_material(self):
|
||||
|
||||
Reference in New Issue
Block a user