New UI to manage IFC constraints in the file

This commit is contained in:
Dion Moult
2020-07-06 17:26:38 +10:00
parent 436eb3a637
commit fda508e3f8
4 changed files with 106 additions and 0 deletions
@@ -820,6 +820,26 @@ class RemoveMaterialPset(bpy.types.Operator):
return {'FINISHED'}
class AddConstraint(bpy.types.Operator):
bl_idname = 'bim.add_constraint'
bl_label = 'Add Constraint'
def execute(self, context):
constraint = bpy.context.scene.BIMProperties.constraints.add()
constraint.name = 'New Constraint'
return {'FINISHED'}
class RemoveConstraint(bpy.types.Operator):
bl_idname = 'bim.remove_constraint'
bl_label = 'Remove Constraint'
index: bpy.props.IntProperty()
def execute(self, context):
bpy.context.scene.BIMProperties.constraints.remove(self.index)
return {'FINISHED'}
class AddDocumentInformation(bpy.types.Operator):
bl_idname = 'bim.add_document_information'
bl_label = 'Add Document Information'