mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +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)
|
external_style = StyleAttributesData.data["style_elements"].get("IfcExternallyDefinedSurfaceStyle", None)
|
||||||
|
|
||||||
if self.use_relative_path:
|
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:
|
else:
|
||||||
filepath = self.filepath
|
filepath = self.filepath
|
||||||
|
filepath = Path(filepath).as_posix()
|
||||||
|
|
||||||
attributes = {
|
attributes = {
|
||||||
"Location": filepath,
|
"Location": filepath,
|
||||||
|
|||||||
Reference in New Issue
Block a user