cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Option to match Mari's UDIM naming convention

Option to match Mari's UDIM naming convention

Would like to be able to match Mari's naming convention for UDIMs.

7 Comments
olivier.lp
Alumni
Status changed to: Gathering Support
 
magillaGuerilla
Collaborator

Yeti does not support mudbox naming so it requires manually renaming all files generated from mudbox

Anonymous
Not applicable

This is super 'low-hanging-fruit'.

jill.ramsay
Alumni
Status changed to: Under Review
 
Anonymous
Not applicable

This is way past due. It's not even funny now.

animalunae
Contributor

For anyone interested, I wrote a small MEL rename script.

 

// chr_uvToUdim
// ------------

global proc chr_uvToUdim(){
	string $textures[] = `fileDialog2 -cap "Select textures to convert" -dir "H:/Cridecoeur_MichielDeRuyter_14/sandbox/assets" -ff "TIFF files (*.tif *.tiff *.tx *.png)" -fm 4`;
	string $one;
	string $bufferPath[];
	string $bufferName[];
	string $bufferFile[];
	string $temp;
	int $uValue;
	int $vValue;
	string $fileType;
	int $c;
	string $path = "";
	string $name = "";


	for ($one in $textures){
		print ("file: " + $one + "\n");
		tokenize $one "\\" $bufferPath;
		//print $bufferPath;
		tokenize $bufferPath[size($bufferPath)-1] "." $bufferFile;
		//print $bufferFile;
		tokenize $bufferFile[size($bufferFile)-2] "_" $bufferName;
		//print $bufferName;

		$fileType = ("." + $bufferFile[1]);
		$temp = endString ($bufferName[size($bufferName)-2], size($bufferName[size($bufferName)-2])-1);
		$uValue = $temp; print ("   U: " + $uValue + "\n");
		$temp = endString ($bufferName[size($bufferName)-1], size($bufferName[size($bufferName)-1])-1);
		$vValue = $temp; print ("   V: " + $vValue + "\n");
		$path = "";
		for ($c=0; $c<(size($bufferPath)-1); $c++){
			$path = ($path + $bufferPath[$c] + "\\");
		}
		print ("Path: " + $path + "\n");
		$name = "";
		for ($c=0; $c<(size($bufferName)-2); $c++){
			$name = ($name + $bufferName[$c]);
			if ($c!=(size($bufferName)-3)) $name = ($name + "_");
		}
		if ($uValue==10) $name = ($name + ".10" + ($vValue) + "0");
		else $name = ($name + ".10" + ($vValue-1) + ($uValue));
		$name = ($name + $fileType);
		print ("Name: " + $name + "\n\n");
		sysFile -rename ($path + $name) $one;
	}
}

 

absoluteKelvin
Collaborator

Thank you so much for sharing this script animalunae!

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea