Storing external styles paths as posix for cross platform compatibility

Also it was wrongly referring to .blend file instead of .ifc to generate relative paths.
This commit is contained in:
Andrej730
2023-07-03 17:09:01 +05:00
parent 3fa5679bd7
commit d57e152c7d
@@ -274,9 +274,10 @@ class BrowseExternalStyle(bpy.types.Operator):
external_style = StyleAttributesData.data["style_elements"].get("IfcExternallyDefinedSurfaceStyle", None)
if self.use_relative_path:
filepath = os.path.relpath(self.filepath, bpy.path.abspath("//"))
filepath = os.path.relpath(self.filepath, tool.Ifc.get_path())
else:
filepath = self.filepath
filepath = Path(filepath).as_posix()
attributes = {
"Location": filepath,