PDA

View Full Version : Using a user defined location to find textures?


Velocamonkey
01-19-2013, 04:43 PM
Hi there, I'm a beginner to Mel and I have a script that involves using textures from a specific folder called "images"

I want to make sure it works for any machine no matter where this "images" folder has been copied to, Windows or Linux.

Ideally I'd like it so that when you run the script it asks the User where you have placed the "images" folder on their machine.

The User would then type in the exact path to the "images" folder wherever it has been copied to on their machine

This path would then be used throughout the script so that the textures can be found in the "images" folder.

Any help and examples would be much appreciated.

Nyro
01-19-2013, 04:57 PM
You could just open a fileDialog (-fileMode flag set to 3) and have the user select the folder, instead of making him type it. Also, you could create an optionVar to store that location so the user doesn't have to do that all over again the next time he runs the script.

CGTalk Moderation
01-19-2013, 04:57 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.