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
@@ -1887,10 +1887,11 @@ class IfcImportSettings:
@staticmethod
def factory(context, input_file, logger):
scene_bim = context.scene.BIMProperties
scene_diff = context.scene.DiffProperties
settings = IfcImportSettings()
settings.input_file = input_file
settings.logger = logger
settings.diff_file = scene_bim.diff_json_file
settings.diff_file = scene_diff.diff_json_file
settings.ifc_import_filter = scene_bim.ifc_import_filter
settings.ifc_selector = scene_bim.ifc_selector
settings.should_import_type_representations = scene_bim.import_should_import_type_representations
@@ -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:
@@ -944,7 +944,6 @@ class BIM_PT_mvd(Panel):
class BIM_UL_generic(bpy.types.UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
ob = data
if item:
layout.prop(item, "name", text="", emboss=False)
else: