mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 12:56:53 +00:00
Optimise owner check depending on your implementation and no longer create default users on IFC4. Can result in 50% faster script running on long scripted operations.
This commit is contained in:
@@ -61,10 +61,11 @@ class CreateProject(bpy.types.Operator):
|
||||
)
|
||||
self.file = IfcStore.get_file()
|
||||
|
||||
person = blenderbim.core.owner.add_person(tool.Ifc)
|
||||
organisation = blenderbim.core.owner.add_organisation(tool.Ifc)
|
||||
user = blenderbim.core.owner.add_person_and_organisation(tool.Ifc, person=person, organisation=organisation)
|
||||
blenderbim.core.owner.set_user(tool.Owner, user=user)
|
||||
if self.file.schema == "IFC2X3":
|
||||
person = blenderbim.core.owner.add_person(tool.Ifc)
|
||||
organisation = blenderbim.core.owner.add_organisation(tool.Ifc)
|
||||
user = blenderbim.core.owner.add_person_and_organisation(tool.Ifc, person=person, organisation=organisation)
|
||||
blenderbim.core.owner.set_user(tool.Owner, user=user)
|
||||
|
||||
project = bpy.data.objects.new(self.get_name("IfcProject", "My Project"), None)
|
||||
site = bpy.data.objects.new(self.get_name("IfcSite", "My Site"), None)
|
||||
|
||||
Reference in New Issue
Block a user