pika
05-22-2004, 02:26 AM
Hello.
I want to import many obj files to to maya, and thinking about
making a batch MEL script to import all the obj files in a specific
folder.
I was able to import a file if I specify the exact name of the file,
but where I got stuck is to make a loop to import other objs in the same directory.
This is a script I extracted from the script editor, and I am wondring how I can modify to make a loop to import other objs.
file -import -type "OBJ" -rpr "test" -options "mo=1" "C:/objs/test.obj";
Simply changing
"C:/objs/test.obj"; to
"C:/objs/*.obj";
did not work, and here is what want to do;
find a file in a specific folder in order of name
import the file
ignore the already imported file,
then find the second file in the same directory,
import the file,
find the third file
and so on... until the last file.
I am thinking the key would be the file input script to
make the loop like above, although I am not sure where
I could start.
I appreciate if any body could help me.
Thank you very much,
I want to import many obj files to to maya, and thinking about
making a batch MEL script to import all the obj files in a specific
folder.
I was able to import a file if I specify the exact name of the file,
but where I got stuck is to make a loop to import other objs in the same directory.
This is a script I extracted from the script editor, and I am wondring how I can modify to make a loop to import other objs.
file -import -type "OBJ" -rpr "test" -options "mo=1" "C:/objs/test.obj";
Simply changing
"C:/objs/test.obj"; to
"C:/objs/*.obj";
did not work, and here is what want to do;
find a file in a specific folder in order of name
import the file
ignore the already imported file,
then find the second file in the same directory,
import the file,
find the third file
and so on... until the last file.
I am thinking the key would be the file input script to
make the loop like above, although I am not sure where
I could start.
I appreciate if any body could help me.
Thank you very much,
