From 77cc97107ef4e4cb6de854440c9642c8560c7087 Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Sun, 3 Nov 2024 17:56:13 -0800 Subject: [PATCH] Fix #113: `is_bdk_addon_loaded` now actually works correctly This was causing an error for some people because of the bizarre behavior around `getattr` and `setattr` in `bpy.ops` always reporting that the BDK was installed. --- io_scene_psk_psa/shared/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_scene_psk_psa/shared/helpers.py b/io_scene_psk_psa/shared/helpers.py index b8ba47e..a352fa9 100644 --- a/io_scene_psk_psa/shared/helpers.py +++ b/io_scene_psk_psa/shared/helpers.py @@ -164,4 +164,4 @@ def get_export_bone_names(armature_object: Object, bone_filter_mode: str, bone_c def is_bdk_addon_loaded() -> bool: - return bpy.ops.bdk is not None and bpy.ops.bdk.link_material is not None + return 'bdk' in dir(bpy.ops)