mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Fix broken select IFC type operator
This commit is contained in:
@@ -133,13 +133,14 @@ class SelectType(bpy.types.Operator):
|
|||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
for object in bpy.context.visible_objects:
|
for object in bpy.context.visible_objects:
|
||||||
if '/' in object.name \
|
if '/' in object.name \
|
||||||
and object.name[0:3] == 'Ifc' \
|
and object.name[0:3] == 'Ifc' \
|
||||||
and object.name.split('/')[0] == bpy.context.scene.BIMProperties.ifc_class \
|
and object.name.split('/')[0] == bpy.context.scene.BIMProperties.ifc_class \
|
||||||
and 'IfcPredefinedType' in object.keys() \
|
and 'PredefinedType' in object.BIMObjectProperties.attributes \
|
||||||
and object['IfcPredefinedType'] == bpy.context.scene.BIMProperties.ifc_predefined_type:
|
and object.BIMObjectProperties.attributes['PredefinedType'].string_value == bpy.context.scene.BIMProperties.ifc_predefined_type:
|
||||||
if bpy.context.scene.BIMProperties.ifc_predefined_type != 'USERDEFINED':
|
if bpy.context.scene.BIMProperties.ifc_predefined_type != 'USERDEFINED':
|
||||||
object.select_set(True)
|
object.select_set(True)
|
||||||
elif object['IfcObjectType'] == bpy.context.scene.BIMProperties.ifc_userdefined_type:
|
elif 'ObjectType' in object.BIMObjectProperties.attributes \
|
||||||
|
and object.BIMObjectProperties.attributes['ObjectType'].string_value == bpy.context.scene.BIMProperties.ifc_userdefined_type:
|
||||||
object.select_set(True)
|
object.select_set(True)
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user