// ConnectPolyShape Layer Switch // by Gino Dammers - gdammers@youngblood-design.com // ------ // Simple script that switches between your the cpsBase and cpsProxy layers. // I made this script because I don't like seeing the smooth version of the object ALL the time. // Also after a while is becomes terribly slow working like this.. (same problem with Subdivision surfaces) // This script lets you switch back and forth between the proxy(original) object and the smoothed(result) object. // Basically like your would work with MetaNURBS in Lightwave.. // Model.. Check Result.. Model.. Check Result.. // // Also build in is the ability to set it back to the way that CPS does it.. (Base and Proxy on top of each other) // // // How to Use: Assign your '0' key to cpsLayerSwitch; // Assign your ')' (Shift 0) key to cpsDisplayReset; // global proc cpsLayerSwitch() { // connectPolyShape Layer Switch if (!`objExists cpsBase`) { warning "CPS not active or cpsBase and cpsProxy Layers have been renamed"; } else { setAttr "cpsBase.shading" 1; if ((`getAttr cpsBase.visibility` == 1) && (`getAttr cpsProxy.visibility` == 1)) { setAttr "cpsBase.visibility" 0; } if ((`getAttr cpsBase.visibility` == 0) && (`getAttr cpsProxy.visibility` == 0)) { setAttr "cpsBase.visibility" 1; } //The Switch string $switchOrig = `getAttr cpsBase.visibility`; string $switchResult = `getAttr cpsProxy.visibility`; if ( $switchOrig == 0) { setAttr "cpsBase.visibility" 1; } else { setAttr "cpsBase.visibility" 0; } if ( $switchResult == 0) { setAttr "cpsProxy.visibility" 1; } else { setAttr "cpsProxy.visibility" 0; } } } global proc cpsDisplayReset() { if (!`objExists cpsBase`) { warning "CPS not active or cpsBase and cpsProxy Layers have been renamed"; } else { // connectPolyShape Display Reset setAttr "cpsBase.shading" 0; setAttr "cpsBase.visibility" 1; setAttr "cpsProxy.visibility" 1; } }