Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'materials_utils/warning_messages_utils.py')
-rw-r--r--materials_utils/warning_messages_utils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/materials_utils/warning_messages_utils.py b/materials_utils/warning_messages_utils.py
index 595e0e31..66c83714 100644
--- a/materials_utils/warning_messages_utils.py
+++ b/materials_utils/warning_messages_utils.py
@@ -129,16 +129,19 @@ def collect_report(collection="", is_start=False, is_final=False):
# collection passes a string for appending to COLLECT_REPORT global
# is_final swithes to the final report with the operator in __init__
global COLLECT_REPORT
+ scene = bpy.context.scene.mat_specials
+ use_report = scene.enable_report
if is_start:
# there was a crash somewhere before the is_final call
COLLECT_REPORT = []
if collection and type(collection) is str:
- COLLECT_REPORT.append(collection)
+ if use_report:
+ COLLECT_REPORT.append(collection)
print(collection)
- if is_final:
+ if is_final and use_report:
# final operator pass uses * as delimiter for splitting into new lines
messages = "*".join(COLLECT_REPORT)
bpy.ops.mat_converter.reports('INVOKE_DEFAULT', message=messages)