Fixed STEP dependencies generation.

This commit is contained in:
Salvador E. Tropea 2021-01-29 10:36:33 -03:00
parent 54febcae44
commit d20d7e5d5c
2 changed files with 5 additions and 4 deletions

View File

@ -292,7 +292,8 @@ def generate_outputs(outputs, target, invert, skip_pre):
def adapt_file_name(name): def adapt_file_name(name):
name = os.path.relpath(name) if not name.startswith('/usr'):
name = os.path.relpath(name)
name = name.replace(' ', r'\ ') name = name.replace(' ', r'\ ')
if '$' in name: if '$' in name:
logger.warning(W_WRONGCHAR+'Wrong character in file name `{}`'.format(name)) logger.warning(W_WRONGCHAR+'Wrong character in file name `{}`'.format(name))

View File

@ -153,7 +153,7 @@ class STEPOptions(VariantOptions):
full_name = KiConf.expand_env(m3d.m_Filename) full_name = KiConf.expand_env(m3d.m_Filename)
if os.path.isfile(full_name): if os.path.isfile(full_name):
models.add(full_name) models.add(full_name)
return models.keys() return list(models)
def save_board(self, dir): def save_board(self, dir):
""" Save the PCB to a temporal file """ """ Save the PCB to a temporal file """
@ -200,12 +200,12 @@ class STEPOptions(VariantOptions):
return fname return fname
def get_targets(self, parent, out_dir): def get_targets(self, parent, out_dir):
return [self.expand_filename_sch(out_dir, self.output, '3D', 'step')] return [self.expand_filename(out_dir, self.output, '3D', 'step')]
def run(self, output_dir): def run(self, output_dir):
super().run(output_dir) super().run(output_dir)
# Output file name # Output file name
output = self.expand_filename(output_dir, self.output, '3D', 'step') output = self.get_targets(None, output_dir)[0]
# Make units explicit # Make units explicit
if self.metric_units: if self.metric_units:
units = 'mm' units = 'mm'