PDA

View Full Version : Opening Maya file wihout refrencing turned on in bat ?


cavemen
03-13-2009, 07:23 AM
Hi

I have a small querry ... I want to export some data from a maya file via a batch command.
however this maya file has a lot of refrence info, so when i run the batch it starts loading all the refrences naturally .. I dont want the refrences to be ticked on, so that i can open the maya file (really quick) with all the refrences switched off, and export out all the necessary unreffered info, Anyone any idea how to do that .. i know there is a command [-loadNoReferences] but m not sure how to call it in a batch file ?

plz help..
thanks

greatPumpkin
03-15-2009, 06:21 PM
how are you loading the file you want to edit? -loadNoReferences is an obslete flag in maya 8.5 moving forward, you want to use loadReferenceDepth instead-


file -open -loadReferenceDepth "none" nameOfFile.mb



(http://forums.cgsociety.org/)

cavemen
03-16-2009, 01:20 PM
oh i didnt know that I am currently working on maya 8.5 ...

I wanted to open a file with references turned off via a batch command in Doc or a bat file .

I'll elaborate with an example

I need to export out renderable cameras from all the animation files say (100 files)...

All these animation files are referenced ...

So I have written a script which will export out all the renderable cameras ..

I also have a batch command which will open the file select the camera and save it out as a seperate file .

However when i run this batch in ms dos it opens the anim file with all the references , which i dont want . I want the batch command to open the files with references turned off and then do the rest of the process of selecting the camera and exporting it out ...

If i can achieve this i just have to source a mel to export the cameras (.. which i already have ... ) and write a batch file for all the 100 scene files in one batch itself :) ...

This will export all the cameras in no time ....

I hope this is not too confusing ..

greatPumpkin
03-16-2009, 03:51 PM
so is there a reason why the command in my previous post won't work for you? you are opening each file in mel already right?

cavemen
03-17-2009, 12:03 PM
actually i am opening the file via a bat

for example i save a .bat file on my system and source a mel file like this

cd C:\Program Files\Autodesk\Maya8.5\bin
maya -batch -noAutoloadPlugins -command "source test.mel;" -file "d:/file.ma "



thats how i am opening the file ... not via a mel ..

because i want the end use to just copy past the above links in the bat to change multiple files ...

greatPumpkin
03-17-2009, 03:57 PM
i think you need to have your file open happen in mel, make the list of files inside your mel script, you can still cut and paste.

so...


string $files[] = {"C:/maya/file001.ma",
"C:/maya/file002.ma",
"C:/maya/file003.ma",
"C:/maya/file004.ma"};

for( $file in files)
{
file -force -open -loadReferenceDepth "none" $file;
// the mel code you want to run goes here:
}

cavemen
03-18-2009, 07:28 AM
yah i think so too there's no command to execute via batch .. :surprised

thanks a lot man... :thumbsup:

CGTalk Moderation
03-18-2009, 07:28 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.