Hi everyone, in our course Advance Rigging for MMA, you will notice that I change the color of my control panel to all white curves and a black plane background. We discussed during class that in order to change the color of the curves, you have to go to color overrides and move the sliders to your desired color. If you will change the color of your entire panel is will take you forever to override each and every curve. That's why in this blog I will be posting a Mel script that you can copy and execute to override your control panel in seconds. Copy the script below:
// Select the curve first, then run this script
string $sel[] = `ls -sl -type transform`;
// Loop through selected objects
for ($obj in $sel) {
// Check if the object has a shape node of type nurbsCurve
string $shapes[] = `listRelatives -shapes $obj`;
for ($shape in $shapes) {
if (`nodeType $shape` == "nurbsCurve") {
// Enable drawing override
setAttr ($shape + ".overrideEnabled") 1;
// Set color to white (index 16 is white in Maya’s color index)
setAttr ($shape + ".overrideColor") 16;
}
}
}
If you need help you can ask me during class and I will show you how to execute this code in Autodesk Maya!