setTRSPreserveUVs is a function which you can't use like you were trying to. This is all you need:setTRSPreserveUVs(!`optionVar -q trsManipsPreserveUvs`) The above queries the current value of preserve UVs via the optionVar and then uses that setTRSPreserveUVs function to set it to the inverse of that.