Forums > Jitter

jit.gl.lua localpath?

August 12, 2009 | 2:05 pm

is there a way to get the local path from inside a lua script, i.e. the equivalent to sending (path) to [thispatcher].

the reason i want to do this inside lua is because i have a few textures inside a /tex folder and i want to be able to do something like this at initialization

tex.file = localpath .. "tex/" .. "mytexture.jpg"

if i wait for max to send the path from this patcher to the script, i have to delay starting the lua script until i receive the path message from max and things just go crazy.

maybe something like luaAV’s findfile?

speaking of which, is it possible to use luaAV modules inside jit.gl.lua and vice versa?

thanks


August 12, 2009 | 9:56 pm

There’s not facility right now to grab a script’s path. I can certainly add that as it’s useful and actually already in the object, just not available through a script.

All modules in LuaAV are standalone Lua modules and thus should be capable of being used by jit.gl.lua. There may be some special considerations for the muro module. If you have any questions about this, feel free to email me.

wes


Viewing 2 posts - 1 through 2 (of 2 total)