mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
improved relative path handling for textures #3365
now we're going to store all texture paths in .ifc as posix to keep them working if .ifc moved from one platform to another previously it was saving all paths as absolute
This commit is contained in:
@@ -130,12 +130,14 @@ class Usecase:
|
||||
return self.create_surface_texture(links[0].from_node, "DIFFUSE")
|
||||
|
||||
def create_surface_texture(self, node, mode):
|
||||
import blenderbim.tool as tool
|
||||
|
||||
texture = self.file.create_entity(
|
||||
"IfcImageTexture",
|
||||
RepeatS=node.extension == "REPEAT",
|
||||
RepeatT=node.extension == "REPEAT",
|
||||
Mode=mode,
|
||||
URLReference=node.image.filepath,
|
||||
URLReference=tool.Blender.blender_path_to_posix(node.image.filepath),
|
||||
)
|
||||
self.textures.append(texture)
|
||||
self.process_texture_coordinates(node, texture)
|
||||
|
||||
Reference in New Issue
Block a user