mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 13:28:19 +00:00
New feature to select similar type
This commit is contained in:
@@ -2212,3 +2212,20 @@ class ReloadIfcFile(bpy.types.Operator):
|
||||
context, bpy.context.scene.BIMProperties.ifc_file, logger)
|
||||
ifc_importer = import_ifc.IfcImporter(ifc_import_settings)
|
||||
ifc_importer.execute()
|
||||
|
||||
|
||||
class SelectSimilarType(bpy.types.Operator):
|
||||
bl_idname = 'bim.select_similar_type'
|
||||
bl_label = 'Select Similar Type'
|
||||
|
||||
def execute(self, context):
|
||||
if context.active_object.BIMObjectProperties.relating_type:
|
||||
relating_type = context.active_object.BIMObjectProperties.relating_type
|
||||
elif 'Type/' in context.active_object.name:
|
||||
relating_type = context.active_object
|
||||
else:
|
||||
return {'FINISHED'}
|
||||
for obj in bpy.context.visible_objects:
|
||||
if obj.BIMObjectProperties.relating_type == relating_type:
|
||||
obj.select_set(True)
|
||||
return {'FINISHED'}
|
||||
|
||||
Reference in New Issue
Block a user