Press "Enter" to skip to content

aoSaveAllRenderImages

[code lang="c"]
// 
// aoKit
// Andrew Odendaal's Maya Script Kit
// Software developed by Andrew Odendaal
// Code compatible with versions 7 - 8.5
//
// Author : Andrew Odendaal
// E-mail : [email protected]
// Website: http://www.andrewodendaal.com
// 

// Save all rendered images in the RenderView
global proc aoKitSaveAllRenderViewImages()
{
	global string $aoKitTempLocation;
	global string $aoKitUserName;
	
	int $aoKitImageQuantity;
	string $aoKitTempVar;

	$aoKitImageQuantity = `intScrollBar -query -value scrollBar` + 2;

	for ($i = 1; $i < $aoKitImageQuantity; $i = $i + 1)
	{
		renderWindowEditor -edit -displayImage $i renderView;
		
		$aoKitTempVar = $aoKitTempLocation + $aoKitUserName + "/" + $i + ".jpg";
		
		print ("\nSaving JPEG to : " + $aoKitTempVar + "\n\n");
		
		renderWindowSaveImageCallback "renderView" $aoKitTempVar "JPEG";
	}
}
// Object Override - Turn On Full Detail on Transforms
global proc aoKitLevelOfDetailFull()
{	
	int $i = 0;
	
	string $mtSelection[] = `ls -sl`;
	for ($i = 0; $i < size($mtSelection[$i]); $i++) 
	{
		$mtSelection[$i] = ($mtSelection[$i] + ".overrideLevelOfDetail");
		setAttr $mtSelection[$i] 0;
	}
}

// Object Override - Turn On Bounding Box Detail on Transforms
global proc aoKitLevelOfDetailBoundingBox()
{	
	int $i = 0;
	
	string $mtSelection[] = `ls -sl`;
	for ($i = 0; $i < size($mtSelection[$i]); $i++) 
	{
		$mtSelection[$i] = ($mtSelection[$i] + ".overrideLevelOfDetail");
		setAttr $mtSelection[$i] 1;
	}
}
[/code]