1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-07-30 20:30:09 +02:00

Fix for issue #57, now searches multiple directories.

This commit is contained in:
Chris Palmer
2020-03-01 10:55:52 +00:00
parent 1a197ac823
commit c41b1fa115
2 changed files with 4 additions and 4 deletions

View File

@@ -124,8 +124,8 @@ def views(target, do_assemblies = None):
# Find all the scad files
#
main_blurb = None
lib_dir = os.environ['OPENSCADPATH'] + '/NopSCADlib/printed'
for dir in [source_dir, source_dir + '/printed', lib_dir]:
lib_dirs = [path + '/' + lib + '/printed' for path in os.environ['OPENSCADPATH'].split(os.pathsep) for lib in os.listdir(path)]
for dir in [source_dir, source_dir + '/printed'] + lib_dirs:
if os.path.isdir(dir):
for filename in os.listdir(dir):
if filename.endswith('.scad'):