From 7e1e18d84522bbea16a92079a4d2ad0061ae6804 Mon Sep 17 00:00:00 2001 From: Joseph HENRY Date: Thu, 2 Apr 2026 11:46:48 +0200 Subject: [PATCH] Fix ContextTempOverride.logging_set missing enable param on 5.0 Blender 5.0's logging_set has no docstring, so introspection produced an empty param list. Add fallback to inject the enable: bool param when the method is discovered without params. Co-Authored-By: Claude Opus 4.6 (1M context) --- introspect.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/introspect.py b/introspect.py index 748660f..5c02941 100644 --- a/introspect.py +++ b/introspect.py @@ -2747,7 +2747,20 @@ def introspect_rna_types() -> ModuleData: result = ctx.temp_override() result_cls = result.__class__ if result_cls.__name__ not in known: - structs.append(introspect_class(result_cls, "bpy.types")) + hidden = introspect_class(result_cls, "bpy.types") + # Fix logging_set if it was introspected without params + # (older Blender versions lack the docstring) + for method in hidden["methods"]: + if method["name"] == "logging_set" and not method["params"]: + method["params"] = [ + { + "name": "enable", + "type": "bool", + "default": None, + "kind": "POSITIONAL_OR_KEYWORD", + }, + ] + structs.append(hidden) known.add(result_cls.__name__) exit_fn = getattr(result, "__exit__", None) if exit_fn is not None: