Selection Higlighting shelf button error
I am trying to put this script into my shelf. Is this script working? If so how can i add it? From the script editor or in the command tab in shelf editor? I saved the script from the script editor into the folder as SH. and esited the line in command tab in shelf editor as source SH;
I get cannot find file SH for source statement error now....
# Toggle Selection Hilite
import maya.cmds as cmds
perspPanel = cmds.getPanel( withLabel='Persp View')
if (cmds.modelEditor( perspPanel, query=1, sel=1)) == 1:
cmds.modelEditor( perspPanel, edit=True, sel=0)
else:
cmds.modelEditor( perspPanel, edit=True, sel=1)