Clear error count after building again

This commit is contained in:
N8n5h 2021-03-20 21:26:05 -03:00
parent 57660631b5
commit 7851abc491
2 changed files with 5 additions and 3 deletions

View file

@ -31,11 +31,13 @@ info_text = ''
num_warnings = 0
num_errors = 0
def clear(clear_warnings=False):
global info_text, num_warnings
def clear(clear_warnings=False, clear_errors=False):
global info_text, num_warnings, num_errors
info_text = ''
if clear_warnings:
num_warnings = 0
if clear_errors:
num_errors = 0
def format_text(text):
return (text[:80] + '..') if len(text) > 80 else text # Limit str size

View file

@ -338,7 +338,7 @@ def build(target, is_play=False, is_publish=False, is_export=False):
if arm.utils.get_save_on_build():
bpy.ops.wm.save_mainfile()
log.clear(clear_warnings=True)
log.clear(clear_warnings=True, clear_errors=True)
# Set camera in active scene
active_scene = arm.utils.get_active_scene()