dbmata
10-16-2006, 05:58 AM
Hey folks,
I'm in the middle of learning mel, and I'm having a hard time finding resources to find out how to read from an external file.
So here is the idea:
I want to create a mel script that will take a .obj file from a directory of obj files, and build a mesh from the info held within the .obj. Then, in the rest of my script I'm planning to have the ability to build 3 types of objects from the associated obj files, randomize their size, and their position in X,Z. The type of mesh generated from the obj files will be based on user input from a window.
So, I've been able to track down fread, but I can't figure out how to get fread to read from a folder, let alone to build a mesh from obj data.
I'm also leaning toward having the folder added into the scripts folder in the maya 7.0 folder found in the particular user's my docs. Any suggestions?
Here is a simplistic version of a user interface window I plan on starting with:
window -t "GeneratorScript" -tb true -rtf true -w 300;
rowColumnLayout -numberOfColumns 4;
button -label "Make Rock" -rs true -command "makeRock";
button -label "Make Bush" -rs true -command "makeBush";
button -label "Make Tree" -rs true -command "makeTree";
button -label "Delete All" -rs true -command "deleteAll";
showWindow;
I'm in the middle of learning mel, and I'm having a hard time finding resources to find out how to read from an external file.
So here is the idea:
I want to create a mel script that will take a .obj file from a directory of obj files, and build a mesh from the info held within the .obj. Then, in the rest of my script I'm planning to have the ability to build 3 types of objects from the associated obj files, randomize their size, and their position in X,Z. The type of mesh generated from the obj files will be based on user input from a window.
So, I've been able to track down fread, but I can't figure out how to get fread to read from a folder, let alone to build a mesh from obj data.
I'm also leaning toward having the folder added into the scripts folder in the maya 7.0 folder found in the particular user's my docs. Any suggestions?
Here is a simplistic version of a user interface window I plan on starting with:
window -t "GeneratorScript" -tb true -rtf true -w 300;
rowColumnLayout -numberOfColumns 4;
button -label "Make Rock" -rs true -command "makeRock";
button -label "Make Bush" -rs true -command "makeBush";
button -label "Make Tree" -rs true -command "makeTree";
button -label "Delete All" -rs true -command "deleteAll";
showWindow;
