You can now add and remove users for ownership history

This commit is contained in:
Dion Moult
2021-10-01 17:32:58 +10:00
parent fe1e30702a
commit 4697e063af
23 changed files with 336 additions and 27 deletions
+2
View File
@@ -44,6 +44,7 @@ class NewFile:
while bpy.data.objects:
bpy.data.objects.remove(bpy.data.objects[0])
bpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True)
blenderbim.bim.handler.setDefaultProperties(None)
class NewIfc:
@@ -54,6 +55,7 @@ class NewIfc:
while bpy.data.objects:
bpy.data.objects.remove(bpy.data.objects[0])
bpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True)
blenderbim.bim.handler.setDefaultProperties(None)
bpy.ops.bim.create_project()
+34 -2
View File
@@ -10,7 +10,7 @@ Scenario: Add person
Scenario: Remove person
Given an empty IFC project
When I press "bim.add_person"
And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
And the variable "person" is "{ifc}.by_type('IfcPerson')[-1].id()"
And I press "bim.remove_person(person={person})"
Then nothing happens
@@ -198,6 +198,38 @@ Scenario: Edit organisation
Scenario: Remove organisation
Given an empty IFC project
When I press "bim.add_organisation"
And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[-1].id()"
And I press "bim.remove_organisation(organisation={organisation})"
Then nothing happens
Scenario: Add person and organisation
Given an empty IFC project
When I press "bim.add_person"
And I press "bim.add_organisation"
And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
And I press "bim.add_person_and_organisation(person={person}, organisation={organisation})"
Then nothing happens
Scenario: Remove person and organisation
Given an empty IFC project
When I press "bim.add_person"
And I press "bim.add_organisation"
And the variable "person" is "{ifc}.by_type('IfcPerson')[-1].id()"
And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[-1].id()"
And I press "bim.add_person_and_organisation(person={person}, organisation={organisation})"
# Note: these are set to -1 temporarily to prevent crashing due to bug #1747
And the variable "pno" is "{ifc}.by_type('IfcPersonAndOrganization')[-1].id()"
And I press "bim.remove_person_and_organisation(person_and_organisation={pno})"
Then nothing happens
Scenario: Set user
Given an empty IFC project
When I press "bim.add_person"
And I press "bim.add_organisation"
And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
And I press "bim.add_person_and_organisation(person={person}, organisation={organisation})"
And the variable "user" is "{ifc}.by_type('IfcPersonAndOrganization')[0].id()"
And I press "bim.set_user(user={user})"
Then nothing happens