diff --git a/invesalius/constants.py b/invesalius/constants.py index ee41059..f46f968 100644 --- a/invesalius/constants.py +++ b/invesalius/constants.py @@ -328,8 +328,9 @@ if hasattr(sys,"frozen") and (sys.frozen == "windows_exe"\ ICON_DIR = os.path.join(abs_path, "icons") SAMPLE_DIR = os.path.join(FILE_PATH, 'samples') DOC_DIR = os.path.join(FILE_PATH, 'docs') - folder=RAYCASTING_PRESETS_DIRECTORY= os.path.join(abs_path, "presets", "raycasting") + RAYCASTING_PRESETS_COLOR_DIRECTORY = os.path.join(abs_path, "presets", "raycasting", "color_list") + else: ICON_DIR = os.path.abspath(os.path.join(FILE_PATH, '..', 'icons')) SAMPLE_DIR = os.path.abspath(os.path.join(FILE_PATH,'..', 'samples')) @@ -339,6 +340,12 @@ else: "presets", "raycasting")) + RAYCASTING_PRESETS_COLOR_DIRECTORY = os.path.abspath(os.path.join(".", + "presets", + "raycasting", + "color_list")) + + # MAC App if not os.path.exists(ICON_DIR): ICON_DIR = os.path.abspath(os.path.join(FILE_PATH, '..', '..', '..', '..', 'icons')) diff --git a/invesalius/presets.py b/invesalius/presets.py index 850e5bc..401ceee 100644 --- a/invesalius/presets.py +++ b/invesalius/presets.py @@ -169,7 +169,7 @@ class Presets(): def get_wwwl_presets(): - files = glob.glob(os.path.join('..', 'presets', 'raycasting', 'color_list', '*.plist')) + files = glob.glob(os.path.join(const.RAYCASTING_PRESETS_COLOR_DIRECTORY, '*.plist')) presets = {} for f in files: p = os.path.splitext(os.path.basename(f))[0] -- libgit2 0.21.2