diff --git a/src/mpfb/entities/material/makeskinmaterial.py b/src/mpfb/entities/material/makeskinmaterial.py index 3a9cf28a..295af551 100644 --- a/src/mpfb/entities/material/makeskinmaterial.py +++ b/src/mpfb/entities/material/makeskinmaterial.py @@ -33,7 +33,9 @@ def _template(self, template_values, has, tex, key): template_values[has] = "false" template_values[tex] = "\"\"" if key in self._settings and self._settings[key]: - _LOG.debug(key + " is set in mhmat") + _LOG.debug(key + " is set in mhmat", self._settings[key]) + self._settings[key] = str(self._settings[key]).replace("\\\\", "/") + self._settings[key] = str(self._settings[key]).replace("\\", "/") template_values[has] = "true" template_values[tex] = "\"" + self._settings[key] + "\"" else: diff --git a/src/mpfb/entities/material/mhmatkeytypes.py b/src/mpfb/entities/material/mhmatkeytypes.py index d20c5e3c..45b1602e 100644 --- a/src/mpfb/entities/material/mhmatkeytypes.py +++ b/src/mpfb/entities/material/mhmatkeytypes.py @@ -69,6 +69,8 @@ def parse_file(self, input_line, location): # TODO: handle case where location is absolute. We cannot use basename since the path # TODO: continues into the structure of the file value = location + "/" + value + value = value.replace("\\\\", "/") # Try to avoid windows style slashes + value = value.replace("\\", "/") return self.key_name, value