[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
// 

// Disable Inherit Transforms on Selection
global proc aoKitDisableInheritTransforms()
{
int $i = 0;

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".inheritsTransform");
setAttr $aoKitSelection[$i] 0;
}
}

// Enable Inherit Transforms on Selection
global proc aoKitEnableInheritTransforms()
{
int $i = 0;

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".inheritsTransform");
setAttr $aoKitSelection[$i] 1;
}
}

// Enable Transform Override
global proc aoKitEnableTransformOverride()
{
int $i = 0;

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".overrideEnabled");
setAttr $aoKitSelection[$i] 1;
}
}

// Disable Transform Override
global proc aoKitDisableTransformOverride()
{
int $i = 0;

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".overrideEnabled");
setAttr $aoKitSelection[$i] 0;
}
}

// Enable Shape Override- FAULTY!!!
global proc aoKitEnableShapeOverride()
{
int $i = 0;

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + "Shape.overrideEnabled");
setAttr $aoKitSelection[$i] 1;
}
}

// Disable Shape Override- FAULTY!!!
global proc aoKitDisableShapeOverride()
{
int $i = 0;

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + "Shape.overrideEnabled");
setAttr $aoKitSelection[$i] 0;
}
}

// Turn Off Render Stats on Selection
global proc mtrenderStatsOff()
{
int $i = 0;

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".castsShadows");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".receiveShadows");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".motionBlur");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".primaryVisibility");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".smoothShading");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".visibleInReflections");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".visibleInRefractions");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".doubleSided");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miTransparencyCast");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miTransparencyReceive");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miReflectionReceive");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miRefractionReceive");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miFinalGatherCast");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miFinalGatherReceive");
setAttr $aoKitSelection[$i] 0;
}


}

// Turn Off Render Stats on Selection, Turn on Primary Visibility
global proc mtrenderStatsOffPrimaryOn()
{
int $i = 0;

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".castsShadows");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".receiveShadows");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".motionBlur");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".primaryVisibility");
setAttr $aoKitSelection[$i] 1;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".smoothShading");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".visibleInReflections");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".visibleInRefractions");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".doubleSided");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miTransparencyCast");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miTransparencyReceive");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miReflectionReceive");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miRefractionReceive");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miFinalGatherCast");
setAttr $aoKitSelection[$i] 0;
}

string $aoKitSelection[] = `ls -sl`;
for ($i = 0; $i < size($aoKitSelection[$i]); $i++) 
{
$aoKitSelection[$i] = ($aoKitSelection[$i] + ".miFinalGatherReceive");
setAttr $aoKitSelection[$i] 0;
}


}
[/code]

Leave a Reply

Your email address will not be published.