int $stVal1 = `selectType -q -nurbsSurface`;
int $stVal2 = `selectType -q -nurbsSurface`;
if ($stVal1 == 0 && $stVal2 == 0) {
selectMode -object;
selectType -handle 1 -ikHandle 1 -joint 1 -nurbsCurve 1 -cos 1 -stroke 1 -nurbsSurface 1 -polymesh 1 -subdiv 1 -plane 1 -lattice 1 -cluster 1 -sculpt 1 -nonlinear 1 -particleShape 1 -emitter 1 -field 1 -spring 1 -rigidBody 1 -fluid 1 -hairSystem 1 -follicle 1 -nCloth 1 -nRigid 1 -dynamicConstraint 1 -rigidConstraint 1 -collisionModel 1 -light 1 -camera 1 -texture 1 -ikEndEffector 1 -locator 1 -dimension 1;
selectType -byName gpuCache 1;
} else {
selectMode -object;
selectType -handle 1 -ikHandle 1 -joint 0 -nurbsCurve 1 -cos 1 -stroke 1 -nurbsSurface 0 -polymesh 0 -subdiv 0 -plane 0 -lattice 1 -cluster 1 -sculpt 1 -nonlinear 1 -particleShape 1 -emitter 1 -field 1 -spring 1 -rigidBody 1 -fluid 1 -hairSystem 1 -follicle 1 -nCloth 1 -nRigid 1 -dynamicConstraint 1 -rigidConstraint 1 -collisionModel 1 -light 1 -camera 1 -texture 1 -ikEndEffector 1 -locator 1 -dimension 1;
selectType -byName gpuCache 0;
}
string $objType = "nurbsSurface";
string $currPanel = `getPanel -withFocus`;
modelEditor -e -allObjects off $currPanel;
{
string $cv = `modelEditor -q -nurbsCurves $currPanel`;
if ($cv == 1) {
modelEditor -e -nurbsCurves off $currPanel;
}
if ($cv == 0) {
modelEditor -e -nurbsCurves on $currPanel;
}
}
{
string $cv = `modelEditor -q -polymeshes $currPanel`;
if ($cv == 1) {
modelEditor -e -polymeshes off $currPanel;
}
if ($cv == 0) {
modelEditor -e -polymeshes on $currPanel;
}
}