You can now clear the active user for ownership history. See #1790.

This commit is contained in:
Dion Moult
2021-10-12 19:12:15 +11:00
parent fc2e12bff6
commit f6128febe9
11 changed files with 54 additions and 8 deletions
+2 -1
View File
@@ -37,7 +37,8 @@ class Ifc(blenderbim.core.tool.Ifc):
@classmethod
def get_schema(cls):
return IfcStore.get_file().schema
if IfcStore.get_file():
return IfcStore.get_file().schema
@classmethod
def get_entity(cls, obj):
+4
View File
@@ -30,6 +30,10 @@ class Owner(blenderbim.core.tool.Owner):
def get_user(cls):
if bpy.context.scene.BIMOwnerProperties.active_user_id:
return tool.Ifc.get().by_id(bpy.context.scene.BIMOwnerProperties.active_user_id)
elif tool.Ifc.get_schema() == "IFC2X3":
users = tool.Ifc.get().by_type("IfcPersonAndOrganization")
if users:
return users[0]
@classmethod
def clear_user(cls):