PyAPI: use None for bpy.app.autoexec_override when it isn't set

Expose `bpy.app.autoexec_override` as as bool or None,
so the boolean can be used to indicate the command line
argument passed in.

Ref !164033
This commit is contained in:
Campbell Barton 2026-09-17 04:26:24 +00:00
parent 93145bafae
commit 3d39eceaee
5 changed files with 23 additions and 10 deletions

View file

@ -175,7 +175,7 @@ def _setup(dirpath_temp, *, use_autoexec, autoexec_override=None):
e = _events_after_load()
t.assertEqual(bpy.data.filepath, "")
t.assertEqual(bpy.app.autoexec_override, autoexec_override is not None)
t.assertEqual(bpy.app.autoexec_override, autoexec_override)
if autoexec_override is None:
t.assertEqual(bpy.app.autoexec, use_autoexec, "Auto-execution follows the preference")
else: