Added a warning whe we download 3D models

This commit is contained in:
Salvador E. Tropea 2022-09-14 10:58:05 -03:00
parent 446364fb32
commit d51791f197
2 changed files with 4 additions and 1 deletions

View File

@ -227,6 +227,7 @@ W_NOPREFLIGHTS = '(W094) '
W_NOPART = '(W095) '
W_MAXDEPTH = '(W096) '
W_3DRESVER = '(W097) '
W_DOWN3D = '(W098) '
# Somehow arbitrary, the colors are real, but can be different
PCB_MAT_COLORS = {'fr1': "937042", 'fr2': "949d70", 'fr3': "adacb4", 'fr4': "332B16", 'fr5': "6cc290"}
PCB_FINISH_COLORS = {'hal': "8b898c", 'hasl': "8b898c", 'imag': "8b898c", 'enig': "cfb96e", 'enepig': "cfb96e",

View File

@ -6,7 +6,7 @@
import os
import requests
import tempfile
from .misc import W_MISS3D, W_FAILDL, DISABLE_3D_MODEL_TEXT
from .misc import W_MISS3D, W_FAILDL, W_DOWN3D, DISABLE_3D_MODEL_TEXT
from .gs import GS
from .out_base import VariantOptions, BaseOutput
from .kicad.config import KiConf
@ -147,6 +147,8 @@ class Base3DOptions(VariantOptions):
# Push the models back
for model in models_l:
models.push_front(model)
if downloaded:
logger.warning(W_DOWN3D+' {} 3D models downloaded'.format(len(downloaded)))
return models_replaced
def list_models(self):