From 30b74ab09c496b3cee19c90a3be16809986af8f8 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 3 Nov 2025 17:30:52 +0500 Subject: [PATCH] blender 5.0 - ensure the latest module is used for type checking --- src/bonsai/bonsai/bim/schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/schema.py b/src/bonsai/bonsai/bim/schema.py index 63c03e4a4a..7890f90006 100644 --- a/src/bonsai/bonsai/bim/schema.py +++ b/src/bonsai/bonsai/bim/schema.py @@ -20,8 +20,9 @@ import ifcopenshell import ifcopenshell.util.pset import bonsai.tool as tool import bpy +from typing import TYPE_CHECKING -if bpy.app.version >= (5, 0, 0): +if TYPE_CHECKING or bpy.app.version >= (5, 0, 0): import _bpy_restrict_state as bpy_restrict_state else: import bpy_restrict_state