Im no programmer but

is it possible to cycle through things with one hotkey instead of 3 or 4 ie

instead of 3 hotkeys for displaying the smoothness of a nurbs surface - have one which toggles through them depending on the previous state ie

if nurbs surface state is 1 (rough) then go to state 2 (smooth) and etc for 3

this would also be handy for my camera views ie
if currently selected window is front then cycle through to the side window etc

cheers

sure, just querry the current state and toggle it to the next etc. Note that this would also mean that different surfaces react differently since nothing states that all the surfs are in the same state!

'im no programmer but....'

sounds great but as I say im no programmer and I was kinda hoping someone could give me a mel help. ie can you do it for me ? or at least a rough mel approximation?

much appreciated

Its scripting not programming its a bit different, but anyway Its basicaly just cut and paste. Besides if you ever intend to use computers (an estimation is that 95-97% of all computer users would clearlybenefit from scripting skills but only 5-10% have them) for more than writing letters then its time to learn heres a super quick tutorial. Read on and learn:

In maya open the script editor (its a button down by the gray command feedback window), hit f1 (you are going to use the command reference). Then select script echo all commands from the script editor (we are going too look at what maya does internaly).

now create a object and change the display settings for it youll se in the script editor that maya calls something like:

MediumQualityDisplay;
setDisplaySmoothness 2;
displaySmoothness -divisionsU 1 -divisionsV 1 -pointsWire 8 -pointsShaded 2;
// Result: 1 //

Now type whatIs setDisplaySmoothness int the white window and hit enter on the number pad (since thet is the command that changes the resolution, atleast by testing a little more seems hint!), remeber its case sensitive so typing whatis instead of whatIs isnt going to work! Maya will now tell what script is called. now open it into a text editor!

by rooting this file we can make an educational guess that the following command changes the resolution.

displaySmoothness

Now we have two options, either make use of this script, modify it build a new one! I would use the original, its not the most elegant solution but works and is very easy to implement.

So lets asume you allways want the entire selection changed to the same value and ou dont mind repeating the key (its simpler and much cleaner code that youll understand easier + it allows you to do further development for your need im not doing your work for you you know just pushing in the right direction):

ok so what do we need, vee need a variable that contains the current state of our toggle! or prefeerably it would be nice to know if its possible to querry? lets see in the help! yes theres a -q switch (allmost allways the case in maya). But using thsi wold expand our code quite a bit so! lets make do wit this. Sorry no whitespaces (gmask how can you use pre in conjunction with P tags by the way seems to bug a bit!)

global proc int toggleSmooth(){
global int $toggleSmoothState=0; //initialize variable only once
$toggleSmoothState=$toggleSmoothState+1; // increase
if ($toggleSmoothState==4)//set back to 1 if more than 4
$toggleSmoothState=1;
setDisplaySmoothness $toggleSmoothState;
return 1;
};

now it toggles them by calling toggleSmooth you can now assign it in the keyboard shortcut in the hotkey manager...

Save this proc ina a file called toggleSmooth.mel and put it in your scripts directory

you star you!