Minor fixes.

This commit is contained in:
Dion Moult
2021-01-21 21:55:08 +11:00
parent b938e4b3c3
commit 460cb85e4b
7 changed files with 15 additions and 6 deletions
@@ -3,7 +3,7 @@ from blenderbim.bim.module.aggregate.data import Data
class BIM_PT_aggregate(Panel):
bl_label = "IFC Aggregation"
bl_label = "IFC Aggregates"
bl_idname = "BIM_PT_aggregate"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
@@ -38,7 +38,7 @@ class BIM_PT_aggregate(Panel):
Data.products[props.ifc_definition_id]["type"], Data.products[props.ifc_definition_id]["Name"]
)
if name == "None/None":
name = "This object is not part of an aggregation"
name = "No Aggregate Found"
row.label(text=name)
row.operator("bim.enable_editing_aggregate", icon="GREASEPENCIL", text="")
row.operator("bim.add_aggregate", icon="ADD", text="")
@@ -18,4 +18,3 @@ class DiffProperties(PropertyGroup):
diff_old_file: StringProperty(default="", name="Diff Old IFC File")
diff_new_file: StringProperty(default="", name="Diff New IFC File")
diff_relationships: StringProperty(default="", name="Diff Relationships")
@@ -1,6 +1,7 @@
import bpy
from bpy.types import Panel
from blenderbim.bim.module.geometry.data import Data
from blenderbim.bim.ifc import IfcStore
class BIM_PT_representations(Panel):
@@ -11,6 +12,10 @@ class BIM_PT_representations(Panel):
bl_region_type = "WINDOW"
bl_context = "object"
@classmethod
def poll(cls, context):
return IfcStore.get_file()
def draw(self, context):
layout = self.layout
props = context.active_object.BIMObjectProperties
@@ -23,7 +23,7 @@ class BIM_PT_project(Panel):
props = context.scene.BIMProperties
row = self.layout.row(align=True)
row.label(text="IFC File", icon="FILE")
row.label(text=os.path.basename(props.ifc_file))
row.label(text=os.path.basename(props.ifc_file) or "No File Found")
row = self.layout.row(align=True)
row.label(text="IFC Schema", icon="FILE_CACHE")
@@ -1,6 +1,7 @@
import bpy
from bpy.types import Panel
from blenderbim.bim.module.void.data import Data
from blenderbim.bim.ifc import IfcStore
class BIM_PT_voids(Panel):
@@ -11,6 +12,10 @@ class BIM_PT_voids(Panel):
bl_region_type = "WINDOW"
bl_context = "object"
@classmethod
def poll(cls, context):
return IfcStore.get_file()
def draw(self, context):
props = context.active_object.BIMObjectProperties
if props.ifc_definition_id not in Data.products: