mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 10:52:45 +00:00
You can now clear the active user for ownership history. See #1790.
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user