diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-14 07:06:44 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-14 07:06:44 +0300 |
commit | d26220d97ab13f39b791468728a6089500d22caa (patch) | |
tree | 9980107e8db0e8b91b44fdbc8678a3ee2d863cd1 /source/blender/makesdna | |
parent | 7bd60d40efbfaa3a18d3cfee409a1a3d1fa6c11d (diff) |
Fix reports printing twice when called from Python in background-mode
Calling operators in background-mode always printed with the
assumption that output should never be hidden.
However operators called from `bpy.ops` were also printing reports to
the `stdout` (needed for the Python console and generally useful).
Resolve by adding a flag to signal that the owner of the ReportList
is responsible for printing to the `stdout`.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 47b7aee54d1..1c71129a3c7 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -70,6 +70,8 @@ enum ReportListFlags { RPT_STORE = (1 << 1), RPT_FREE = (1 << 2), RPT_OP_HOLD = (1 << 3), /* don't move them into the operator global list (caller will use) */ + /** Don't print (the owner of the #ReportList will handle printing to the `stdout`). */ + RPT_PRINT_HANDLED_BY_OWNER = (1 << 4), }; /* These two Lines with # tell makesdna this struct can be excluded. */ |