mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user