diff --git a/src/libslic3r/Utils.hpp b/src/libslic3r/Utils.hpp index 976374fe81..5c71553132 100644 --- a/src/libslic3r/Utils.hpp +++ b/src/libslic3r/Utils.hpp @@ -170,6 +170,9 @@ const std::string& sys_shapes_dir(); // Return a full path to the custom shapes gallery directory. std::string custom_shapes_dir(); +// Return a full path to the handy models directory. +std::string handy_models_dir(); + // Set a path with shapes gallery files. void set_custom_gcodes_dir(const std::string &path); // Return a full path to the system shapes gallery directory. diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index 3168a15f79..25aad9a066 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -295,6 +295,11 @@ std::string custom_shapes_dir() return (boost::filesystem::path(g_data_dir) / "shapes").string(); } +std::string handy_models_dir() +{ + return (boost::filesystem::path(resources_dir()) / "handy_models").string(); +} + static std::atomic debug_out_path_called(false); std::string debug_out_path(const char *name, ...) @@ -1028,7 +1033,7 @@ bool is_gallery_file(const std::string &path, char const* type) bool is_shapes_dir(const std::string& dir) { - return dir == sys_shapes_dir() || dir == custom_shapes_dir(); + return dir == sys_shapes_dir() || dir == custom_shapes_dir() || dir == handy_models_dir(); } } // namespace Slic3r