Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Cannot apply texture in script
  RSS 2.0 ATOM  

Cannot apply texture in script
Rate this thread
 
35079
 
Permlink of this thread   Subscribe to this thread
avatar
  • drohrlick
  • Posted: 30 September 2009 12:01 PM
  • Total Posts: 23
  • Joined: 21 March 2008 03:32 AM

Hello,

I’m trying to write a simple script that applies a new texture image to an existing scene, save and exit.

//Open file
file -f -options “v=0” -typ “mayaAscii” -o “OriginalFile.ma”;addRecentFile("OriginalFile.ma", “mayaAscii")

//Apply the new texture
AEassignTextureCB file1.fileTextureName “texture.png” “Best Guess”;

//Save and exit
file -rename “TexturedScene.ma”;
file -f -save -options “v=0” -type “mayaAscii”;
quit -a;

It always dies saying:
// Error: Cannot find procedure “AEassignTextureCB”. //

I have to manually go in and apply the texture. The moment I type “AEassignTextureCB” command in the script editor everything works fine. I just don’t understand MEL sometimes! Thanks in advance for any advice.



Replies: 0
avatar
  • Norbert
  • Posted: 19 November 2009 11:31 AM

Hi There,
Please see this script:

C:/Program Files/Autodesk/Maya2009/scripts/AETemplates/AEfileTemplate.mel

Thank You,
Norbert Nacu



Replies: 0




   
  Settings Choose Theme color: