mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 23:29:59 +00:00
Fix bug where blank predefined types could be added by accident
This commit is contained in:
@@ -85,9 +85,10 @@ class AssignClass(bpy.types.Operator):
|
|||||||
object_type_index = object.ObjectProperties.attributes.find('ObjectType')
|
object_type_index = object.ObjectProperties.attributes.find('ObjectType')
|
||||||
if object_type_index >= 0:
|
if object_type_index >= 0:
|
||||||
object.ObjectProperties.attributes.remove(object_type_index)
|
object.ObjectProperties.attributes.remove(object_type_index)
|
||||||
predefined_type = object.ObjectProperties.attributes.add()
|
if bpy.context.scene.BIMProperties.ifc_predefined_type:
|
||||||
predefined_type.name = 'PredefinedType'
|
predefined_type = object.ObjectProperties.attributes.add()
|
||||||
predefined_type.string_value = bpy.context.scene.BIMProperties.ifc_predefined_type # TODO: make it an enum
|
predefined_type.name = 'PredefinedType'
|
||||||
|
predefined_type.string_value = bpy.context.scene.BIMProperties.ifc_predefined_type # TODO: make it an enum
|
||||||
if bpy.context.scene.BIMProperties.ifc_predefined_type == 'USERDEFINED':
|
if bpy.context.scene.BIMProperties.ifc_predefined_type == 'USERDEFINED':
|
||||||
object_type = object.ObjectProperties.attributes.add()
|
object_type = object.ObjectProperties.attributes.add()
|
||||||
object_type.name = 'ObjectType'
|
object_type.name = 'ObjectType'
|
||||||
|
|||||||
Reference in New Issue
Block a user