Exporting now uses custom people and organisations defined from the UI. See #875.

This commit is contained in:
Dion Moult
2020-07-13 15:29:06 +10:00
parent bdbe988dc7
commit fa1926fa84
7 changed files with 309 additions and 136 deletions
@@ -917,6 +917,25 @@ class RemovePersonAddress(bpy.types.Operator):
return {'FINISHED'}
class AddPersonRole(bpy.types.Operator):
bl_idname = 'bim.add_person_role'
bl_label = 'Add Person Role'
def execute(self, context):
new = bpy.context.scene.BIMProperties.people[bpy.context.scene.BIMProperties.active_person_index].roles.add()
return {'FINISHED'}
class RemovePersonRole(bpy.types.Operator):
bl_idname = 'bim.remove_person_role'
bl_label = 'Remove Person Role'
index: bpy.props.IntProperty()
def execute(self, context):
bpy.context.scene.BIMProperties.people[bpy.context.scene.BIMProperties.active_person_index].roles.remove(self.index)
return {'FINISHED'}
class AddOrganisation(bpy.types.Operator):
bl_idname = 'bim.add_organisation'
bl_label = 'Add Organisation'
@@ -957,6 +976,25 @@ class RemoveOrganisationAddress(bpy.types.Operator):
return {'FINISHED'}
class AddOrganisationRole(bpy.types.Operator):
bl_idname = 'bim.add_organisation_role'
bl_label = 'Add Organisation Role'
def execute(self, context):
new = bpy.context.scene.BIMProperties.organisations[bpy.context.scene.BIMProperties.active_organisation_index].roles.add()
return {'FINISHED'}
class RemoveOrganisationRole(bpy.types.Operator):
bl_idname = 'bim.remove_organisation_role'
bl_label = 'Remove Organisation Role'
index: bpy.props.IntProperty()
def execute(self, context):
bpy.context.scene.BIMProperties.organisations[bpy.context.scene.BIMProperties.active_organisation_index].roles.remove(self.index)
return {'FINISHED'}
class AddDocumentInformation(bpy.types.Operator):
bl_idname = 'bim.add_document_information'
bl_label = 'Add Document Information'