August 19, 2021
3 min

Lock/Unlock Xgen Guides Script

An interesting request for the groom forum was how to make the guides unselectable on xgen so I made a super quick script that could be cleaner and working better but here it is if you guys want.

The easiest way will be to select the guides that you want to block for selection. This script works with mel.

Make selected guides unselectable

/////Make selected guides unselectable

string $xgenGuides[] = `ls -sl `;

for ($item in $xgenGuides)

{

   setAttr ($item + ".template") 1;

}

This is going to make the selected guides unselectable (template ) and if you want to make them selectable again  run this one

Make selected guides selectable

////Make all guides selectable

string $xgenGuides[] = `ls "*xgGuide*" `;

for ($item in $xgenGuides)

{

   setAttr ($item + ".template") 0;

}