Get Project path

Get Project path

Anonymous
Not applicable
487 Views
2 Replies
Message 1 of 3

Get Project path

Anonymous
Not applicable

Hi,

 

 

I am trying to do some lua io writing to file operations. Is there anyway I can retrieve the Project folder path?

I guess its possible since everything is relative to the project folder.

 

Thanks!

Reply
Reply
488 Views
2 Replies
Replies (2)
Message 2 of 3

paul.kind
Alumni
Alumni

As you said everything is relative to project path. I am not sure exactly what you want to achieve since everything in your project is already known.

Areas of Expertise - MayaLT : Mudbox : 3DS Max : Inventor : Game Dev
Follow me on Twitter : @paulkind3d

Please remember to give kudos freely and mark acceptable answers as solved!

PLEASE do not send me private messages unless asked to do so. If you have a question, start a thread, and ask me on the public forums where answering your question may help others.

Did you know there was a YouTube learning channel for Autodesk Games? New videos are posted regularly with all sorts of content relative to Stingray, Maya/MayaLT, 3DS Max, and other game related tools. Get your game on @ https://www.youtube.com/user/autodeskgameshowtos
Reply
Reply
0 Likes
Message 3 of 3

Anonymous
Not applicable

Hi,

 

For example, I am doing some lua.io operations to create a text file in the root project directory.

 

file = io.open("output.txt", "w") -- This does not works

file = io.open("C:/Users/Me/Desktop/Project/output.txt", "w") -- This works

 

Hence, I am wondering if there are some tokens which I could use to get the project folder path.

For example something like:

 

file = io.open("%ProjectDIR%/output.txt", "w")

 

Thanks!

Reply
Reply