summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/TODO.txt1
-rw-r--r--src/parsersettings.cc10
2 files changed, 10 insertions, 1 deletions
diff --git a/doc/TODO.txt b/doc/TODO.txt
index c58a942..be70c26 100644
--- a/doc/TODO.txt
+++ b/doc/TODO.txt
@@ -240,6 +240,7 @@ o Collect "all" available OpenSCAD scripts from the internets and run the integr
MISSING TESTS:
--------------
o cmd-line -D variable override
+o OPENSCADPATH env.variable
o all functions
o mirror
o scale
diff --git a/src/parsersettings.cc b/src/parsersettings.cc
index 47859c7..3dda132 100644
--- a/src/parsersettings.cc
+++ b/src/parsersettings.cc
@@ -28,7 +28,15 @@ std::string locate_file(const std::string &filename)
void parser_init(const std::string &applicationpath)
{
- // FIXME: Append paths from OPENSCADPATH before adding built-in paths
+ // Add path from OPENSCADPATH before adding built-in paths
+ const char *openscadpath = getenv("OPENSCADPATH");
+ if (openscadpath) {
+ add_librarydir(boosty::absolute(fs::path(openscadpath)).string());
+ }
+
+ // FIXME: Support specifying more than one path in OPENSCADPATH
+ // FIXME: Add ~/.openscad/libraries
+ // FIXME: Add ~/Documents/OpenSCAD/libraries on Mac?
std::string librarydir;
fs::path libdir(applicationpath);
contact: Jan Huwald // Impressum