AEfileTemplate.mel

AEfileTemplate.mel

Anonymous
Not applicable
1,040 Views
1 Reply
Message 1 of 2

AEfileTemplate.mel

Anonymous
Not applicable

Can anyone give me an unchanged AEfileTemplate.mel for Maya 2017 update 3, Windows 64bit? I messed around with it because a lambert I applied was not rendering on an object and I was given a solution....only now I continuously get syntax errors. I don't know that much python but I tried everything I knew to fix it myself. I just need a new, vanilla copy or for someone to correct these lines:

 

    string $currFile = `getAttr $ftn`;
	if ($currFile != "") {
		int $i;
		string $allTextures[] = `ls -typ file`;
		mentalrayTexture`;
		// this loop is needed to guarantee all texture nodes 		who
		// reference this file gets updated.
		for ($i = 0; $i < size($allTextures); $i++) {
			string $ithFile = `getAttr ($allTextures[$i] + ".ftn")`;

Thanks.

0 Likes
1,041 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Hi nicnobile

 

It looks like you have just got a mistake on one of the lines. Try replacing that function with this:

 

global proc AEfileTextureReloadCmd (string $ftn)
{
    string $currFile = `getAttr $ftn`;
	if ($currFile != "") {
		int $i;
		string $allTextures[] = `ls -typ file -type mentalrayTexture`;

		// this loop is needed to guarantee all texture nodes who
		// reference this file gets updated.
		for ($i = 0; $i < size($allTextures); $i++) {
			string $ithFile = `getAttr ($allTextures[$i] + ".ftn")`;
			if ($ithFile == $currFile)
				setAttr ($allTextures[$i] + ".ftn") -type "string" $currFile;
		}
	}
}

Cheers

 

Mike

0 Likes