mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
New UI to set features dir and diff JSON file
This commit is contained in:
@@ -18,6 +18,8 @@ classes = (
|
|||||||
operator.AssignClass,
|
operator.AssignClass,
|
||||||
operator.SelectClass,
|
operator.SelectClass,
|
||||||
operator.SelectType,
|
operator.SelectType,
|
||||||
|
operator.SelectFeaturesDir,
|
||||||
|
operator.SelectDiffJsonFile,
|
||||||
operator.SelectDataDir,
|
operator.SelectDataDir,
|
||||||
operator.SelectSchemaDir,
|
operator.SelectSchemaDir,
|
||||||
operator.ExportIFC,
|
operator.ExportIFC,
|
||||||
@@ -53,6 +55,8 @@ classes = (
|
|||||||
ui.BIMMeshProperties,
|
ui.BIMMeshProperties,
|
||||||
ui.GISPanel,
|
ui.GISPanel,
|
||||||
ui.BIMPanel,
|
ui.BIMPanel,
|
||||||
|
ui.QAPanel,
|
||||||
|
ui.DiffPanel,
|
||||||
ui.MVDPanel,
|
ui.MVDPanel,
|
||||||
ui.MaterialPanel,
|
ui.MaterialPanel,
|
||||||
ui.MeshPanel,
|
ui.MeshPanel,
|
||||||
|
|||||||
@@ -384,6 +384,32 @@ class SelectExternalMaterialDir(bpy.types.Operator):
|
|||||||
context.window_manager.fileselect_add(self)
|
context.window_manager.fileselect_add(self)
|
||||||
return {'RUNNING_MODAL'}
|
return {'RUNNING_MODAL'}
|
||||||
|
|
||||||
|
class SelectDiffJsonFile(bpy.types.Operator):
|
||||||
|
bl_idname = "bim.select_diff_json_file"
|
||||||
|
bl_label = "Select Diff JSON File"
|
||||||
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
|
|
||||||
|
def execute(self, context):
|
||||||
|
bpy.context.scene.BIMProperties.diff_json_file = self.filepath
|
||||||
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
def invoke(self, context, event):
|
||||||
|
context.window_manager.fileselect_add(self)
|
||||||
|
return {'RUNNING_MODAL'}
|
||||||
|
|
||||||
|
class SelectFeaturesDir(bpy.types.Operator):
|
||||||
|
bl_idname = "bim.select_features_dir"
|
||||||
|
bl_label = "Select Features Directory"
|
||||||
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
|
|
||||||
|
def execute(self, context):
|
||||||
|
bpy.context.scene.BIMProperties.features_dir = self.filepath
|
||||||
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
def invoke(self, context, event):
|
||||||
|
context.window_manager.fileselect_add(self)
|
||||||
|
return {'RUNNING_MODAL'}
|
||||||
|
|
||||||
class SelectDataDir(bpy.types.Operator):
|
class SelectDataDir(bpy.types.Operator):
|
||||||
bl_idname = "bim.select_data_dir"
|
bl_idname = "bim.select_data_dir"
|
||||||
bl_label = "Select Data Directory"
|
bl_label = "Select Data Directory"
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ class BIMProperties(bpy.types.PropertyGroup):
|
|||||||
pset_file: bpy.props.EnumProperty(items=getPsetFiles, name="Pset File")
|
pset_file: bpy.props.EnumProperty(items=getPsetFiles, name="Pset File")
|
||||||
has_georeferencing: bpy.props.BoolProperty(name="Has Georeferencing", default=False)
|
has_georeferencing: bpy.props.BoolProperty(name="Has Georeferencing", default=False)
|
||||||
global_id: bpy.props.StringProperty(name="GlobalId")
|
global_id: bpy.props.StringProperty(name="GlobalId")
|
||||||
|
features_dir: bpy.props.StringProperty(default='', name="Features Directory")
|
||||||
|
diff_json_file: bpy.props.StringProperty(default='', name="Diff JSON File")
|
||||||
|
|
||||||
class MapConversion(bpy.types.PropertyGroup):
|
class MapConversion(bpy.types.PropertyGroup):
|
||||||
eastings: bpy.props.StringProperty(name="Eastings")
|
eastings: bpy.props.StringProperty(name="Eastings")
|
||||||
@@ -301,6 +303,26 @@ class BIMPanel(bpy.types.Panel):
|
|||||||
row.operator("bim.assign_pset")
|
row.operator("bim.assign_pset")
|
||||||
row.operator("bim.unassign_pset")
|
row.operator("bim.unassign_pset")
|
||||||
|
|
||||||
|
class QAPanel(bpy.types.Panel):
|
||||||
|
bl_label = "BIMTester Quality Auditing"
|
||||||
|
bl_idname = "BIM_PT_qa"
|
||||||
|
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="")
|
||||||
|
|
||||||
layout.label(text="Quality Auditing:")
|
layout.label(text="Quality Auditing:")
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
@@ -319,6 +341,26 @@ class BIMPanel(bpy.types.Panel):
|
|||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator("bim.select_audited")
|
row.operator("bim.select_audited")
|
||||||
|
|
||||||
|
class DiffPanel(bpy.types.Panel):
|
||||||
|
bl_label = "IFC Diff"
|
||||||
|
bl_idname = "BIM_PT_diff"
|
||||||
|
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="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="")
|
||||||
|
|
||||||
class MVDPanel(bpy.types.Panel):
|
class MVDPanel(bpy.types.Panel):
|
||||||
bl_label = "Model View Definitions"
|
bl_label = "Model View Definitions"
|
||||||
bl_idname = "BIM_PT_mvd"
|
bl_idname = "BIM_PT_mvd"
|
||||||
|
|||||||
Reference in New Issue
Block a user