2019-10-05 21:15:53 +10:00
|
|
|
import bpy
|
2019-11-17 11:38:56 +11:00
|
|
|
from bpy.types import Panel
|
2019-11-15 01:44:29 +01:00
|
|
|
|
|
|
|
|
class BIM_PT_object(Panel):
|
2019-10-16 23:17:48 +11:00
|
|
|
bl_label = 'IFC Object'
|
|
|
|
|
bl_idname = 'BIM_PT_object'
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = 'object'
|
2019-11-30 22:42:04 +11:00
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.active_object is not None and hasattr(context.active_object, "BIMObjectProperties")
|
2019-12-03 17:27:22 +11:00
|
|
|
|
2019-10-16 23:17:48 +11:00
|
|
|
def draw(self, context):
|
2019-12-03 17:27:22 +11:00
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
if context.active_object is None:
|
2019-10-16 23:17:48 +11:00
|
|
|
return
|
|
|
|
|
layout = self.layout
|
2019-11-15 01:44:29 +01:00
|
|
|
props = context.active_object.BIMObjectProperties
|
|
|
|
|
|
2019-10-16 23:17:48 +11:00
|
|
|
layout.label(text="Software Identity:")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.generate_global_id')
|
|
|
|
|
|
|
|
|
|
layout.label(text="Attributes:")
|
2019-10-19 13:48:07 +11:00
|
|
|
row = layout.row(align=True)
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'applicable_attributes', text='')
|
2019-10-16 23:17:48 +11:00
|
|
|
row.operator('bim.add_attribute')
|
|
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
for index, attribute in enumerate(props.attributes):
|
2019-10-16 23:17:48 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(attribute, 'name', text='')
|
|
|
|
|
row.prop(attribute, 'string_value', text='')
|
2019-11-13 18:48:12 +11:00
|
|
|
row.operator('bim.remove_attribute', icon='X', text='').attribute_index = index
|
2019-10-16 23:17:48 +11:00
|
|
|
|
|
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'attributes')
|
2019-10-16 23:17:48 +11:00
|
|
|
|
2020-01-23 15:23:19 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'type_product')
|
|
|
|
|
|
2019-10-19 11:36:29 +11:00
|
|
|
layout.label(text="Property Sets:")
|
|
|
|
|
row = layout.row()
|
2020-01-12 19:01:35 +11:00
|
|
|
row.prop(context.scene.BIMProperties, "pset_name")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(context.scene.BIMProperties, "pset_file")
|
|
|
|
|
row = layout.row()
|
2019-10-19 11:36:29 +11:00
|
|
|
row.operator('bim.add_pset')
|
|
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
for index, pset in enumerate(props.psets):
|
2019-10-19 11:36:29 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(pset, 'name', text='')
|
|
|
|
|
row.prop(pset, 'file', text='')
|
2019-11-13 18:48:12 +11:00
|
|
|
row.operator('bim.remove_pset', icon='X', text='').pset_index = index
|
2019-10-19 11:36:29 +11:00
|
|
|
|
|
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'psets')
|
2019-10-19 11:36:29 +11:00
|
|
|
|
2020-01-15 17:17:03 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(props, 'override_pset_name', text='')
|
|
|
|
|
row.operator('bim.add_override_pset')
|
|
|
|
|
|
|
|
|
|
for index, pset in enumerate(props.override_psets):
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(pset, 'name', text='')
|
|
|
|
|
row.operator('bim.remove_override_pset', icon='X', text='').pset_index = index
|
|
|
|
|
for prop in pset.properties:
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(prop, 'name', text='')
|
|
|
|
|
row.prop(prop, 'string_value', text='')
|
|
|
|
|
|
2019-10-21 15:31:10 +11:00
|
|
|
layout.label(text="Documents:")
|
|
|
|
|
row = layout.row(align=True)
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'applicable_documents', text='')
|
2019-10-21 15:31:10 +11:00
|
|
|
row.operator('bim.add_document')
|
|
|
|
|
|
2019-12-03 17:27:22 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.fetch_object_passport')
|
|
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
for index, document in enumerate(props.documents):
|
2019-10-21 15:31:10 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(document, 'file', text='')
|
2019-11-13 18:48:12 +11:00
|
|
|
row.operator('bim.remove_document', icon='X', text='').document_index = index
|
2019-10-21 15:31:10 +11:00
|
|
|
|
|
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'documents')
|
2019-10-21 15:31:10 +11:00
|
|
|
|
2019-11-01 17:44:10 +11:00
|
|
|
layout.label(text="Classification:")
|
|
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
for index, classification in enumerate(props.classifications):
|
2019-11-01 17:44:10 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(classification, 'identification', text='')
|
|
|
|
|
row.prop(classification, 'name', text='')
|
2019-11-13 18:48:12 +11:00
|
|
|
row.operator('bim.remove_classification', icon='X', text='').classification_index = index
|
2019-11-01 17:44:10 +11:00
|
|
|
|
|
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'classifications')
|
2019-11-01 17:44:10 +11:00
|
|
|
|
2020-01-14 13:28:48 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'material_type')
|
|
|
|
|
|
2020-01-19 18:41:57 +11:00
|
|
|
layout.label(text='Structural Boundary Condition:')
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'has_boundary_condition')
|
|
|
|
|
|
|
|
|
|
if bpy.context.active_object.BIMObjectProperties.has_boundary_condition:
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props.boundary_condition, 'name')
|
|
|
|
|
for index, attribute in enumerate(props.boundary_condition.attributes):
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(attribute, 'name', text='')
|
|
|
|
|
row.prop(attribute, 'string_value', text='')
|
|
|
|
|
|
2020-01-20 16:22:24 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'structural_member_connection')
|
|
|
|
|
|
2019-11-01 17:44:10 +11:00
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
class BIM_PT_mesh(Panel):
|
2019-10-13 15:36:49 +11:00
|
|
|
bl_label = 'IFC Representations'
|
|
|
|
|
bl_idname = 'BIM_PT_mesh'
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = 'data'
|
|
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.active_object is not None and context.active_object.type == "MESH" and \
|
|
|
|
|
hasattr(context.active_object.data, "BIMMeshProperties")
|
2019-12-03 17:27:22 +11:00
|
|
|
|
2019-10-13 15:36:49 +11:00
|
|
|
def draw(self, context):
|
2019-11-15 01:44:29 +01:00
|
|
|
if not context.active_object.data:
|
2019-10-13 15:36:49 +11:00
|
|
|
return
|
|
|
|
|
layout = self.layout
|
2019-11-15 01:44:29 +01:00
|
|
|
props = context.active_object.data.BIMMeshProperties
|
2020-01-08 16:58:59 +11:00
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(bpy.context.scene.BIMProperties, 'available_contexts', text='')
|
|
|
|
|
row.prop(bpy.context.scene.BIMProperties, 'available_subcontexts', text='')
|
|
|
|
|
row.prop(bpy.context.scene.BIMProperties, 'available_target_views', text='')
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.assign_context')
|
|
|
|
|
|
2020-02-04 11:57:06 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'is_parametric')
|
|
|
|
|
|
2019-10-13 15:36:49 +11:00
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'is_wireframe')
|
2019-10-13 15:36:49 +11:00
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'is_swept_solid')
|
2019-11-13 18:48:12 +11:00
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.add_swept_solid')
|
2019-11-15 01:44:29 +01:00
|
|
|
for index, swept_solid in enumerate(props.swept_solids):
|
2019-11-13 18:48:12 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(swept_solid, 'name', text='')
|
|
|
|
|
row.operator('bim.remove_swept_solid', icon='X', text='').index = index
|
|
|
|
|
row = layout.row()
|
|
|
|
|
sub = row.row(align=True)
|
|
|
|
|
sub.operator('bim.assign_swept_solid_outer_curve').index = index
|
|
|
|
|
sub.operator('bim.select_swept_solid_outer_curve', icon='RESTRICT_SELECT_OFF', text='').index = index
|
|
|
|
|
sub = row.row(align=True)
|
|
|
|
|
sub.operator('bim.add_swept_solid_inner_curve').index = index
|
|
|
|
|
sub.operator('bim.select_swept_solid_inner_curves', icon='RESTRICT_SELECT_OFF', text='').index = index
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.operator('bim.assign_swept_solid_extrusion').index = index
|
|
|
|
|
row.operator('bim.select_swept_solid_extrusion', icon='RESTRICT_SELECT_OFF', text='').index = index
|
2019-11-08 12:39:34 +11:00
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'swept_solids')
|
|
|
|
|
|
2019-10-13 15:36:49 +11:00
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
class BIM_PT_material(Panel):
|
2019-10-13 11:14:49 +11:00
|
|
|
bl_label = 'IFC Materials'
|
|
|
|
|
bl_idname = 'BIM_PT_material'
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = 'material'
|
2019-12-03 17:27:22 +11:00
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
return context.active_object is not None and context.active_object.active_material is not None
|
2019-12-03 17:27:22 +11:00
|
|
|
|
2019-10-13 11:14:49 +11:00
|
|
|
def draw(self, context):
|
|
|
|
|
if not bpy.context.active_object.active_material:
|
|
|
|
|
return
|
2019-11-15 01:44:29 +01:00
|
|
|
props = context.active_object.active_material.BIMMaterialProperties
|
2019-10-13 11:14:49 +11:00
|
|
|
layout = self.layout
|
|
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'is_external')
|
2019-10-13 15:36:49 +11:00
|
|
|
row = layout.row(align=True)
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'location')
|
2019-10-13 15:36:49 +11:00
|
|
|
row.operator('bim.select_external_material_dir', icon="FILE_FOLDER", text="")
|
2019-10-13 11:14:49 +11:00
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'identification')
|
2019-10-13 11:14:49 +11:00
|
|
|
row = layout.row()
|
2019-11-15 01:44:29 +01:00
|
|
|
row.prop(props, 'name')
|
|
|
|
|
|
2019-11-30 22:42:04 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.fetch_external_material')
|
|
|
|
|
|
2020-01-14 15:38:22 +11:00
|
|
|
layout.label(text="Attributes:")
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(props, 'applicable_attributes', text='')
|
|
|
|
|
row.operator('bim.add_material_attribute')
|
|
|
|
|
|
|
|
|
|
for index, attribute in enumerate(props.attributes):
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(attribute, 'name', text='')
|
|
|
|
|
row.prop(attribute, 'string_value', text='')
|
|
|
|
|
row.operator('bim.remove_material_attribute', icon='X', text='').attribute_index = index
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'attributes')
|
|
|
|
|
|
2020-01-12 19:01:35 +11:00
|
|
|
layout.label(text="Property Sets:")
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(props, 'available_material_psets', text='')
|
|
|
|
|
row.operator('bim.add_material_pset')
|
|
|
|
|
|
|
|
|
|
for index, pset in enumerate(props.psets):
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(pset, 'name', text='')
|
|
|
|
|
row.operator('bim.remove_material_pset', icon='X', text='').pset_index = index
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'psets', text='')
|
|
|
|
|
|
2020-01-14 17:38:54 +11:00
|
|
|
if context.active_object.BIMObjectProperties.material_type == 'IfcMaterialProfileSet':
|
|
|
|
|
layout.label(text="Profile Definition:")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'profile_def')
|
|
|
|
|
|
|
|
|
|
for index, attribute in enumerate(props.profile_attributes):
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(attribute, 'name', text='')
|
|
|
|
|
row.prop(attribute, 'string_value', text='')
|
|
|
|
|
|
2019-10-13 11:14:49 +11:00
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
class BIM_PT_gis(Panel):
|
2019-10-19 15:15:42 +11:00
|
|
|
bl_label = 'IFC Georeferencing'
|
|
|
|
|
bl_idname = "BIM_PT_gis"
|
2019-11-21 06:48:22 +11:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2019-10-19 15:15:42 +11:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2019-11-15 01:44:29 +01:00
|
|
|
scene = context.scene
|
|
|
|
|
layout.row().prop(scene.BIMProperties, 'has_georeferencing')
|
2019-10-19 15:15:42 +11:00
|
|
|
|
|
|
|
|
layout.label(text="Map Conversion:")
|
2019-11-15 01:44:29 +01:00
|
|
|
layout.row().prop(scene.MapConversion, 'eastings')
|
|
|
|
|
layout.row().prop(scene.MapConversion, 'northings')
|
|
|
|
|
layout.row().prop(scene.MapConversion, 'orthogonal_height')
|
|
|
|
|
layout.row().prop(scene.MapConversion, 'x_axis_abscissa')
|
|
|
|
|
layout.row().prop(scene.MapConversion, 'x_axis_ordinate')
|
|
|
|
|
layout.row().prop(scene.MapConversion, 'scale')
|
2019-10-19 15:15:42 +11:00
|
|
|
|
|
|
|
|
layout.label(text="Target CRS:")
|
2019-11-15 01:44:29 +01:00
|
|
|
layout.row().prop(scene.TargetCRS, 'name')
|
|
|
|
|
layout.row().prop(scene.TargetCRS, 'description')
|
|
|
|
|
layout.row().prop(scene.TargetCRS, 'geodetic_datum')
|
|
|
|
|
layout.row().prop(scene.TargetCRS, 'vertical_datum')
|
|
|
|
|
layout.row().prop(scene.TargetCRS, 'map_projection')
|
|
|
|
|
layout.row().prop(scene.TargetCRS, 'map_zone')
|
|
|
|
|
layout.row().prop(scene.TargetCRS, 'map_unit')
|
|
|
|
|
|
|
|
|
|
|
2019-12-10 18:54:26 +11:00
|
|
|
class BIM_PT_documentation(Panel):
|
|
|
|
|
bl_label = "Diagrammatic Documentation"
|
|
|
|
|
bl_idname = "BIM_PT_documentation"
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = 'output'
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2020-01-06 10:41:59 +11:00
|
|
|
layout.use_property_split = True
|
2019-12-10 18:54:26 +11:00
|
|
|
props = bpy.context.scene.DocProperties
|
|
|
|
|
|
2020-01-06 10:41:59 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'view_name')
|
|
|
|
|
row.operator('bim.create_view', icon='ADD', text='')
|
|
|
|
|
|
2020-01-06 14:30:44 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'available_views')
|
|
|
|
|
row.operator('bim.activate_view', icon='SCENE', text='')
|
|
|
|
|
|
2020-02-01 22:49:35 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.set_view_preset_1')
|
|
|
|
|
|
2019-12-11 18:50:01 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.create_sheets')
|
|
|
|
|
|
2019-12-20 10:43:39 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.generate_digital_twin')
|
|
|
|
|
|
2020-01-03 15:53:57 +11:00
|
|
|
|
2020-01-06 11:46:42 +11:00
|
|
|
class BIM_PT_camera(Panel):
|
|
|
|
|
bl_label = "Diagrams and Documentation"
|
|
|
|
|
bl_idname = "BIM_PT_camera"
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = 'data'
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
|
|
|
|
engine = context.engine
|
2020-02-03 18:01:41 +11:00
|
|
|
return context.camera and \
|
2020-01-06 11:46:42 +11:00
|
|
|
hasattr(context.active_object.data, "BIMCameraProperties")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
dprops = bpy.context.scene.DocProperties
|
|
|
|
|
props = context.active_object.data.BIMCameraProperties
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(dprops, 'should_recut')
|
|
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(props, 'diagram_scale', text='')
|
|
|
|
|
row.operator('bim.cut_section')
|
|
|
|
|
|
|
|
|
|
|
2020-01-03 15:53:57 +11:00
|
|
|
class BIM_PT_owner(Panel):
|
|
|
|
|
bl_label = "Owner History"
|
|
|
|
|
bl_idname = "BIM_PT_owner"
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
props = scene.BIMProperties
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'person')
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'organisation')
|
|
|
|
|
|
2019-12-04 17:49:28 +11:00
|
|
|
class BIM_PT_context(Panel):
|
|
|
|
|
bl_label = "Geometric Representation Contexts"
|
|
|
|
|
bl_idname = "BIM_PT_context"
|
2020-02-19 17:24:28 +11:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2019-12-04 17:49:28 +11:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
props = scene.BIMProperties
|
|
|
|
|
|
2019-12-07 17:02:59 +11:00
|
|
|
for context in ['model', 'plan']:
|
2019-12-04 17:49:28 +11:00
|
|
|
row = layout.row(align=True)
|
2020-01-08 16:58:59 +11:00
|
|
|
row.prop(props, f'has_{context}_context')
|
|
|
|
|
|
|
|
|
|
if not getattr(props, f'has_{context}_context'):
|
|
|
|
|
continue
|
2019-12-04 17:49:28 +11:00
|
|
|
|
2020-01-08 16:58:59 +11:00
|
|
|
layout.label(text="Geometric Representation Subcontexts:")
|
2019-12-04 17:49:28 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(props, 'available_subcontexts', text='')
|
|
|
|
|
row.prop(props, 'available_target_views', text='')
|
2019-12-07 17:02:59 +11:00
|
|
|
row.operator('bim.add_subcontext', icon='ADD', text='').context = context
|
2019-12-04 17:49:28 +11:00
|
|
|
|
2019-12-07 17:02:59 +11:00
|
|
|
for subcontext_index, subcontext in enumerate(getattr(props, '{}_subcontexts'.format(context))):
|
2019-12-04 17:49:28 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(subcontext, 'name', text='')
|
|
|
|
|
row.prop(subcontext, 'target_view', text='')
|
2019-12-07 17:02:59 +11:00
|
|
|
row.operator('bim.remove_subcontext', icon='X', text='').indexes = '{}-{}'.format(context, subcontext_index)
|
2019-12-04 17:49:28 +11:00
|
|
|
|
|
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
class BIM_PT_bim(Panel):
|
2019-10-05 21:15:53 +10:00
|
|
|
bl_label = "Building Information Modeling"
|
2019-10-13 11:14:49 +11:00
|
|
|
bl_idname = "BIM_PT_bim"
|
2019-10-05 21:15:53 +10:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2019-10-19 15:15:42 +11:00
|
|
|
layout.use_property_split = True
|
2019-10-05 21:15:53 +10:00
|
|
|
|
|
|
|
|
scene = context.scene
|
2019-11-15 01:44:29 +01:00
|
|
|
bim_properties = scene.BIMProperties
|
2019-10-05 21:15:53 +10:00
|
|
|
|
|
|
|
|
layout.label(text="System Setup:")
|
|
|
|
|
|
2019-10-19 10:47:00 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.quick_project_setup')
|
|
|
|
|
|
2020-01-29 11:42:43 +11:00
|
|
|
row = layout.row(align=True)
|
2019-10-05 21:15:53 +10:00
|
|
|
row.prop(bim_properties, "schema_dir")
|
|
|
|
|
row.operator("bim.select_schema_dir", icon="FILE_FOLDER", text="")
|
|
|
|
|
|
2020-01-29 11:42:43 +11:00
|
|
|
row = layout.row(align=True)
|
2019-10-05 21:15:53 +10:00
|
|
|
row.prop(bim_properties, "data_dir")
|
|
|
|
|
row.operator("bim.select_data_dir", icon="FILE_FOLDER", text="")
|
|
|
|
|
|
2020-01-29 11:42:43 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(bim_properties, "ifc_file")
|
|
|
|
|
row.operator("bim.select_ifc_file", icon="FILE_FOLDER", text="")
|
|
|
|
|
|
2019-10-05 21:15:53 +10:00
|
|
|
layout.label(text="IFC Categorisation:")
|
|
|
|
|
|
2020-01-13 17:35:56 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "ifc_product")
|
2019-10-05 21:15:53 +10:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "ifc_class")
|
2020-01-13 17:42:59 +11:00
|
|
|
if bim_properties.ifc_predefined_type:
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "ifc_predefined_type")
|
|
|
|
|
if bim_properties.ifc_predefined_type == 'USERDEFINED':
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "ifc_userdefined_type")
|
2019-10-05 21:15:53 +10:00
|
|
|
row = layout.row()
|
|
|
|
|
row.operator("bim.assign_class")
|
2019-10-07 22:23:31 +11:00
|
|
|
|
2019-10-08 22:09:39 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.operator("bim.select_class")
|
|
|
|
|
row.operator("bim.select_type")
|
|
|
|
|
|
2019-10-16 07:23:03 +11:00
|
|
|
layout.label(text="Property Sets:")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "pset_name")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "pset_file")
|
|
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.operator("bim.assign_pset")
|
2019-10-19 11:36:29 +11:00
|
|
|
row.operator("bim.unassign_pset")
|
2019-10-16 07:23:03 +11:00
|
|
|
|
2019-11-01 16:32:11 +11:00
|
|
|
layout.label(text="Aggregates:")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "aggregate_class")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "aggregate_name")
|
2020-01-08 15:58:39 +11:00
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
2019-11-01 16:32:11 +11:00
|
|
|
row.operator("bim.create_aggregate")
|
2020-01-08 15:58:39 +11:00
|
|
|
row.operator("bim.explode_aggregate")
|
2019-11-01 16:32:11 +11:00
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.operator("bim.edit_aggregate")
|
|
|
|
|
row.operator("bim.save_aggregate")
|
|
|
|
|
|
2019-11-01 17:44:10 +11:00
|
|
|
layout.label(text="Classifications:")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "classification")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "reference")
|
|
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.operator("bim.assign_classification")
|
|
|
|
|
row.operator("bim.unassign_classification")
|
|
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
|
2020-02-19 17:24:01 +11:00
|
|
|
class BIM_PT_search(Panel):
|
|
|
|
|
bl_label = "BIM Search"
|
|
|
|
|
bl_idname = "BIM_PT_search"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
props = scene.BIMProperties
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'search_regex')
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(props, 'search_ignorecase')
|
|
|
|
|
|
|
|
|
|
layout.label(text="Global ID:")
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(props, 'global_id', text='')
|
|
|
|
|
row.operator('bim.select_global_id', text='', icon='VIEWZOOM')
|
|
|
|
|
|
|
|
|
|
layout.label(text="Attribute:")
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(props, 'search_attribute_name', text='')
|
|
|
|
|
row.prop(props, 'search_attribute_value', text='')
|
|
|
|
|
row.operator('bim.select_attribute', text='', icon='VIEWZOOM')
|
|
|
|
|
|
2020-02-20 17:31:38 +11:00
|
|
|
layout.label(text="Pset:")
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(props, 'search_pset_path', text='')
|
|
|
|
|
row.prop(props, 'search_pset_value', text='')
|
|
|
|
|
row.operator('bim.select_pset', text='', icon='VIEWZOOM')
|
|
|
|
|
|
2020-02-19 17:24:01 +11:00
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
class BIM_PT_qa(Panel):
|
2019-10-29 18:13:10 +11:00
|
|
|
bl_label = "BIMTester Quality Auditing"
|
|
|
|
|
bl_idname = "BIM_PT_qa"
|
2019-11-21 06:48:22 +11:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2019-10-29 18:13:10 +11:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
bim_properties = bpy.context.scene.BIMProperties
|
|
|
|
|
|
|
|
|
|
layout.label(text="Gherkin Setup:")
|
|
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(bim_properties, "features_dir")
|
|
|
|
|
row.operator("bim.select_features_dir", icon="FILE_FOLDER", text="")
|
|
|
|
|
|
2020-01-28 18:10:33 +11:00
|
|
|
if bim_properties.features_dir:
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(bim_properties, "features_file")
|
|
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(bim_properties, "scenario")
|
|
|
|
|
|
2019-10-10 18:29:22 +11:00
|
|
|
layout.label(text="Quality Auditing:")
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "qa_reject_element_reason")
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.operator("bim.reject_element")
|
|
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.operator("bim.colour_by_class")
|
|
|
|
|
row.operator("bim.reset_object_colours")
|
|
|
|
|
|
2019-11-26 21:05:05 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, "audit_ifc_class")
|
|
|
|
|
|
2019-10-10 18:29:22 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.operator("bim.approve_class")
|
|
|
|
|
row.operator("bim.reject_class")
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.operator("bim.select_audited")
|
|
|
|
|
|
2019-11-21 07:09:08 +11:00
|
|
|
class BIM_PT_library(Panel):
|
|
|
|
|
bl_label = "BIM Server Library"
|
|
|
|
|
bl_idname = "BIM_PT_library"
|
2020-02-19 17:24:28 +11:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2019-11-21 07:09:08 +11:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
bim_properties = scene.BIMProperties
|
|
|
|
|
|
2019-11-21 21:27:32 +11:00
|
|
|
layout.row().prop(scene.BIMProperties, 'has_library')
|
2019-11-21 07:09:08 +11:00
|
|
|
|
|
|
|
|
layout.label(text="Project Library:")
|
|
|
|
|
layout.row().prop(scene.BIMLibrary, 'location')
|
|
|
|
|
layout.row().operator("bim.fetch_library_information")
|
|
|
|
|
layout.row().prop(scene.BIMLibrary, 'name')
|
|
|
|
|
layout.row().prop(scene.BIMLibrary, 'version')
|
|
|
|
|
layout.row().prop(scene.BIMLibrary, 'version_date')
|
|
|
|
|
layout.row().prop(scene.BIMLibrary, 'description')
|
2019-11-15 01:44:29 +01:00
|
|
|
|
|
|
|
|
class BIM_PT_diff(Panel):
|
2019-10-29 18:13:10 +11:00
|
|
|
bl_label = "IFC Diff"
|
|
|
|
|
bl_idname = "BIM_PT_diff"
|
2020-02-19 17:24:28 +11:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2019-10-29 18:13:10 +11:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
2019-11-15 01:44:29 +01:00
|
|
|
bim_properties = scene.BIMProperties
|
2019-10-29 18:13:10 +11:00
|
|
|
|
|
|
|
|
layout.label(text="IFC Diff Setup:")
|
|
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(bim_properties, "diff_json_file")
|
|
|
|
|
row.operator("bim.select_diff_json_file", icon="FILE_FOLDER", text="")
|
|
|
|
|
|
2020-01-07 14:27:34 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(bim_properties, "diff_old_file")
|
|
|
|
|
row.operator("bim.select_diff_old_file", icon="FILE_FOLDER", text="")
|
|
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
row.prop(bim_properties, "diff_new_file")
|
|
|
|
|
row.operator("bim.select_diff_new_file", icon="FILE_FOLDER", text="")
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.operator('bim.execute_ifc_diff')
|
|
|
|
|
|
2019-11-15 01:44:29 +01:00
|
|
|
|
|
|
|
|
class BIM_PT_mvd(Panel):
|
2019-10-07 22:23:31 +11:00
|
|
|
bl_label = "Model View Definitions"
|
2019-10-13 11:14:49 +11:00
|
|
|
bl_idname = "BIM_PT_mvd"
|
2019-10-07 22:23:31 +11:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "scene"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
2019-11-15 01:44:29 +01:00
|
|
|
bim_properties = scene.BIMProperties
|
2019-10-07 22:23:31 +11:00
|
|
|
|
2020-01-24 10:19:44 +11:00
|
|
|
layout.label(text='Custom MVD:')
|
2019-10-07 22:23:31 +11:00
|
|
|
|
|
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'export_has_representations')
|
2019-12-31 16:32:20 +11:00
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'import_should_import_curves')
|
2020-01-31 12:52:44 +11:00
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, 'import_should_import_opening_elements')
|
2019-12-31 16:32:20 +11:00
|
|
|
|
2020-01-24 10:19:44 +11:00
|
|
|
layout.label(text='Experimental Modes:')
|
2019-12-31 16:32:20 +11:00
|
|
|
|
|
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'import_should_use_legacy')
|
2019-12-31 16:32:20 +11:00
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'import_should_use_cpu_multiprocessing')
|
2019-12-31 16:32:20 +11:00
|
|
|
|
2020-01-24 10:19:44 +11:00
|
|
|
layout.label(text='Vendor Workarounds:')
|
2019-12-31 16:32:20 +11:00
|
|
|
|
2020-01-09 15:30:43 +11:00
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'import_should_auto_set_workarounds')
|
|
|
|
|
|
|
|
|
|
layout.label(text='12D Workarounds:')
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.prop(bim_properties, 'import_should_reset_absolute_coordinates')
|
|
|
|
|
|
|
|
|
|
layout.label(text='Revit Workarounds:')
|
|
|
|
|
|
2019-11-08 15:10:51 +11:00
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'export_should_export_all_materials_as_styled_items')
|
2019-11-08 15:10:51 +11:00
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'export_should_use_presentation_style_assignment')
|
2019-11-08 17:24:15 +11:00
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'import_should_ignore_site_coordinates')
|
2019-11-08 16:02:57 +11:00
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'import_should_ignore_building_coordinates')
|
2020-01-22 21:43:18 +11:00
|
|
|
row = layout.row()
|
2020-01-24 10:19:44 +11:00
|
|
|
row.prop(bim_properties, 'import_should_treat_styled_item_as_material')
|