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:
Dion Moult
2025-01-14 13:35:01 +11:00
parent 9a77c94758
commit adcc23541a
+2 -3
View File
@@ -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):