mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 23:50:59 +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["paginated_relating_types"] = AuthoringData.paginated_relating_types()
|
||||||
AuthoringData.data["type_predefined_type"] = AuthoringData.type_predefined_type()
|
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):
|
def update_relating_type_id(self, context):
|
||||||
AuthoringData.data["relating_type_id"] = AuthoringData.relating_type_id()
|
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()
|
ifc_file = tool.Ifc.get()
|
||||||
body = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW")
|
body = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW")
|
||||||
if not body:
|
if not body:
|
||||||
|
props.type_class = props.type_class
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
if template == "MESH":
|
if template == "MESH":
|
||||||
@@ -415,6 +416,7 @@ class AddType(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
bpy.ops.bim.add_roof()
|
bpy.ops.bim.add_roof()
|
||||||
|
|
||||||
bpy.ops.bim.load_type_thumbnails(ifc_class=ifc_class)
|
bpy.ops.bim.load_type_thumbnails(ifc_class=ifc_class)
|
||||||
|
props.type_class = props.type_class
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
def add_default_material(self):
|
def add_default_material(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user