Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / Maya 2012 python issue (saving out template)
  RSS 2.0 ATOM  

Maya 2012 python issue (saving out template)
Rate this thread
 
63164
 
Permlink of this thread  
avatar
  • magton
  • Posted: 29 December 2011 12:09 PM
  • Total Posts: 2
  • Joined: 10 February 2010 08:30 PM

Hi - I had a programmer develop a tool for me in maya 2010. One of the requirements was that tool has to be able to save out / read in template file. The tool works flawlessly in may 2010 but i have to use maya 2012. I can open the tool and use it in maya 2012 but I cant save out a template. I get a “fatal error trying to save in...” whenever i go to set the directory. Unfortunately the developer is no longer available to work on the script.He told me he found the problem, Here is what he said: “So after combing pretty much the entire Maya Help documents, it appears that it doesn’t work with Maya 2012 because they completely rewrote the save commands.The standard command in 2010 is writelines() to write files and to read is readline()For Maya 2012, the commands are fgetline() and fwrite().” So i used a python editor and changed the above commands to fgetline and fwrite. However, i get the same error. I was wondering if any python/mel expert would be able to look at the code and give me any quick pointers. Should simply replacing the old commands with the new ones work? I can post the affected scripts if needed.



Replies: 0