mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 11:46:33 +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
|
@classmethod
|
||||||
def is_representation_item_active(cls) -> bool:
|
def is_representation_item_active(cls) -> bool:
|
||||||
object = bpy.context.active_object
|
if not (obj := tool.Blender.get_active_object()):
|
||||||
if not object:
|
|
||||||
return False
|
return False
|
||||||
return tool.Geometry.is_representation_item(object)
|
return tool.Geometry.is_representation_item(obj)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def active_representation_type(cls):
|
def active_representation_type(cls):
|
||||||
|
|||||||
Reference in New Issue
Block a user