splib.loaders

Utilitary function to ease the writing of scenes.

loadPointListFromFile(s) Load a set of 3D point from a json file
getLoadingLocation(filename[, source]) Compute a loading path for the provided filename relative to a given source location

splib.loaders.loadPointListFromFile

splib.loaders.loadPointListFromFile(s)[source]

Load a set of 3D point from a json file

splib.loaders.getLoadingLocation(filename, source=None)[source]

Compute a loading path for the provided filename relative to a given source location

Examples:
getLoadingLocation(“myfile.json”) # returns “myfile.json getLoadingLocation(“myfile.json”, “toto”) #returns “/fullpath/to/toto/myfile.json” getLoadingLocation(“myfile.json”, __file__) #returns “/fullpath/to/toto/myfile.json”

The latter is really usefull to make get the path for a file relative to the ‘current’ python source.