aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-12-12 21:34:34 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-12-12 21:34:34 +0000
commita85f13782212abb95b6784132dd381c3ab757794 (patch)
treef877a75f6ebe1bea278b0b667bca488d2c9eeb1f
parent95650fa74a8eea5efc1af56511eb6dbb7e58e17a (diff)
search path for object_tags.tcllistbackups/scripts/guiplugins/object_db@14666
svn path=/trunk/scripts/guiplugins/object_db/; revision=14594
-rw-r--r--object_db-plugin.tcl16
1 files changed, 11 insertions, 5 deletions
diff --git a/object_db-plugin.tcl b/object_db-plugin.tcl
index 898a0f4..9aed204 100644
--- a/object_db-plugin.tcl
+++ b/object_db-plugin.tcl
@@ -38,11 +38,17 @@ array set object_tags {}
# tag reverse mapping
array set objects_with_tag {}
-# load object -> tags mapping from file
-set f [open [file join $::current_pathdir object_tags.tcllist]]
-set tmp_db [read $f]
-close $f
-unset f
+# load object -> tags mapping from file in Pd's path
+foreach pathdir [concat $::sys_searchpath $::sys_staticpath] {
+ set dir [file normalize $pathdir]
+ set testfile [file join $dir object_tags.tcllist]
+ if { [file isfile $testfile]} {
+ set f [open $testfile]
+ set tmp_db [read $f]
+ close $f
+ unset f
+ }
+}
foreach {library object tags} $tmp_db {
# skip unwanted libraries