mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 11:24:19 +00:00
Fix bug where starting a new file in an existing session would prompt an error.
Bpy.context.active_object is not available in-between loading / starting a new file.
This commit is contained in:
@@ -241,10 +241,9 @@ class AuthoringData:
|
||||
|
||||
@classmethod
|
||||
def is_representation_item_active(cls) -> bool:
|
||||
object = bpy.context.active_object
|
||||
if not object:
|
||||
if not (obj := tool.Blender.get_active_object()):
|
||||
return False
|
||||
return tool.Geometry.is_representation_item(object)
|
||||
return tool.Geometry.is_representation_item(obj)
|
||||
|
||||
@classmethod
|
||||
def active_representation_type(cls):
|
||||
|
||||
Reference in New Issue
Block a user