PDA

View Full Version : modo command line arguments?


blender
06-03-2005, 08:25 PM
Hello fellow Modo users..
I already posted this on the Luxology forum, i figured it wouldn't hurt to give it a try here too.

I'm still fairly new to Modo, and I have a quick question to the community.

I know that you can run modo through the Win command prompt, with the proper env. variable set.

What i wanted to know is if you can open a particular file from the command prompt. Are there any command line arguments for running modo, or opening a file?

I did a search on this already, and haven't been able to find anything thus far.

I hope i'm making sense :o)
Thanks in advance for any help
cheers!

StephanD
06-15-2005, 02:19 PM
Someone's a command-line addict methinks heh?

Sure you can :)


According Modo is in your PATH and file.lwo's location is in there too just type;

modo file.lwo


I suggest you put your working directory in you path too.


Hope this helps

-Steff

blender
06-17-2005, 07:13 AM
thanks for the reply StephanD..

i was a bit careless in posting this before i exhausted all my options.
i ended up figuring it out afterall.

i am a Maya user, and still feel very comfortable with Maya's modeling tools.. so i wanted to write a quick mel script to throw a poly mesh into modo, quickly edit it, and immediately bring it back into Maya to continue working. That required some command line calls to modo.

all i had to do was set Modo to be the default program to open all the .obj files.

here's the script if anyone is interested in using it. it's not super elegant or anything, and still has a bug or two.. but it does the job for my workflow.

to use it. while working in Maya, select a poly object, run the script, it'll pop the object into Modo, edit the object, hit Save, close Modo, and hit the Yes button on the dialog window in Maya to bring the object back.

---------------------------------------------

{

string $exportPath = (`workspace -q -fullName` + "/MODO");
string $fullExportPath = $exportPath + "/tempFromMaya.obj";
string $selectedObjects[] = `ls -sl`;

if (!`filetest -d $exportPath`)
sysFile -md $exportPath;

if (`filetest -w $exportPath`)
sysFile -del $fullExportPath;

file -op "groups=1;ptgroups=1;materials=0;smoothing=0;normals=1" -typ "OBJexport" -es $fullExportPath;
system $fullExportPath;

if (`confirmDialog -title "bring back" -message "Bring mesh back?"
-button "Yes"
-button "No"
-defaultButton "Yes"
-cancelButton "No"
-dismissString "No"` == "Yes")
{

for ($each in $selectedObjects)
delete $each;

file -import -type "OBJ" -rdn -rpr "tempFromMaya" -options "mo=1" -pr $fullExportPath;

for ($each in $selectedObjects)
{
select $each;
sets -e -forceElement initialShadingGroup;
polySoftEdge -a 0 -ch 1 `ls -sl`;
polySetToFaceNormal -setUserNormal ;
delete -ch `ls -sl`;
}


clear $selectedObjects;
select -cl;

}

}

----------------------------------------

cheers

CGTalk Moderation
06-17-2005, 07:13 AM
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.