Load LUA Libraries
The included GML file provides a small LUA script that will be executed
on the GirderEnable event. The script provides 2 functions that can be used
from any LUA script once loaded.
This function is called with a single string argument that specifies a
directory path (with no trailing "\"). The function looks for all files ending
with the ".lua" extension in the directory and calls the builtin LUA function
"dofile" for each one. This has the effect of loading a set of files which
define useful functions to be used within Girder.
This function takes one or more directory paths and calls the previous function
for each path.
The script also provides a global string variable, "lualib", which contains
the path to the [proposed] default LUA library path (GIRDERDIR\lualib). When
the script is executed (usually on a GirderEnable event), it calls the
"loadLUALibrary" function with this path. This effectivly loads all the
libraries found in the default LUA library path.
To make effective use of this script:
1) create a directory "lualib" in the main Girder directory (usually
2) import the GML file into Girder and move the top level group "Load LUA
Libraries" to the top of your GML so it will execute before any other
script that may need the libraries that will be loaded
3) place text files that define useful LUA functions in the directory created
in step 1 (make sure the files have an extension of ".lua")
Written by Thomas Bennedum (tab/frdfsnlght) for all Girder users.