Skip to content

Commit 535efd8

Browse files
committed
small tweak to the previous commits
1 parent 170b98a commit 535efd8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/blenderbim/blenderbim/bim/module/drawing/scheduler.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from odf.style import Style
3131
from textwrap import wrap
3232
from pathlib import Path
33+
from blenderbim.bim.ifc import IfcStore
3334

3435
DEBUG = False
3536

@@ -75,8 +76,8 @@ def parse_css(self, infile):
7576
stylesheet_path = os.path.splitext(infile)[0] + ".css"
7677
if not os.path.exists(stylesheet_path):
7778
stylesheet_rel_path = getattr(bpy.context.scene.DocProperties, "schedules_stylesheet_path")
78-
infile_directory = os.path.dirname(infile)
79-
stylesheet_path = infile_directory + "\\" + stylesheet_rel_path
79+
ifc_file_path = os.path.dirname(IfcStore.path)
80+
stylesheet_path = ifc_file_path + "\\" + stylesheet_rel_path
8081
if not os.path.exists(stylesheet_path):
8182
stylesheet_path = os.path.join(bpy.context.scene.BIMProperties.data_dir, "assets", "schedule.css")
8283
with open(stylesheet_path, "r") as stylesheet:

0 commit comments

Comments
 (0)