diff --git a/src/bonsai/bonsai/bim/module/style/operator.py b/src/bonsai/bonsai/bim/module/style/operator.py index fbbc388b66..a6fd66ae22 100644 --- a/src/bonsai/bonsai/bim/module/style/operator.py +++ b/src/bonsai/bonsai/bim/module/style/operator.py @@ -538,7 +538,12 @@ class ChooseTextureMapPath(bpy.types.Operator): abs_path = Path(self.filepath) if self.use_relative_path: - image_filepath = abs_path.relative_to(Path(tool.Ifc.get_path()).parent) + parent = Path(tool.Ifc.get_path()).parent + if abs_path.is_relative_to(parent): + image_filepath = abs_path.relative_to(parent) + else: + self.report({"INFO"}, "Path is not relative to the .ifc file, it will be saved as absolute.") + image_filepath = abs_path else: image_filepath = abs_path