Hi,
I need a little help please :sad:
First let me explain my problem. I need to create a reference on Maya 2009, however the reference that I want to use was saved on Maya 2010. After some research I checked that Maya 2009 and 2010 have a option in Open File, that you can ignore the version and therefore open a file saved on Maya 2009 even if we use Maya 2010.
Then I tried to do the same with the reference.
Adding these flags
-options "v=0" -ignoreVersion
to
file -r -type "mayaBinary" -gl -loadReferenceDepth "all" -namespace "hello" "//BACKUP/Example/hello.mb";
I was able to create a reference of a file saved on Maya 2011 in Maya 2010.
But I have a lot references to do this, so I needed to create a simple UI interface or script to using this flag
-ignoreVersion
.
global proc int importReference( string $filename, string $fileType )
{
file -r -options "v=0" -ignoreVersion -type "mayaBinary" -gl -loadReferenceDepth "all" $filename;
return 1;
}
fileBrowserDialog -m 0 -fc "importReference" -ft "mayaBinary" -an "Import\_Refernce" -om "Reference";
But a I have a little problem
This script only works if I already have open a file. Let me explain, if I open Maya and then run this script, he don't work, but if I open Maya and open a file and then for example create a New Scene and run the script he works.
Can anyone please give me a clue how can I overcome this situation?