[Bf-committers] Pupmenu conventions. (Was: CVS commit:blender/source/blender/src edit.c)

Robert Wenzlaff bf-committers@blender.org
Mon, 6 Oct 2003 00:55:47 -0400

On Sunday 05 October 2003 11:44 am, Stephen Swaney wrote:
> > -Ton-
> On behalf of all the blender users whose fingers
> have been trained over the years, I thank you!

Unfourtuantly, all the new users who have to look at a jumbled list of 
features in chronological order will curse us.  They want to see the 
functions grouped logically.  (I'll admit that in Goofster's case the Logic 
is subjective).

But when you have: 

"Subdivide,  Fractal Subdivide, Smooth Subdivide, Mirror, Merge, 
RemoveDoubles, Hide, Reveal, Select Swap, Flip Normals, Smooth"

It seems odd that "Knife Subdivde" should come after Smooth.   (Yes, when we 
get the Cut menu, it will be removed from the W menu, but it points up a 
bigger design issue.)   By always adding to the end of the list, it assures 
that all the menus are in chronological order based on when the feature was 
coded, but the Users don't give a squat about "when" a feature was written 
(other than "not yet").  To them it's just a random order.  And if I proposed 
a feature that specifically specifed placing the options in "random order", 
it would get shot down in an instant.

At some point, we need to come up with a better way...  The sooner the better.

How difficult would it be to change the pupmenus to a single char input 
instead of a single digit input (since digit input only works for 9 or fewer 
items anyway).  Each menu item could specify a "hot letter", that  would be 
underlined or bold in its text, that would trigger it (maybe more than one?).  
The "famous" ones could specify the hot letter (or one of) as their famous 
number (in parenthesis as part of the text).  Other features could then 
specify a key letter in their name (In many cases it will be their hotkey, 

If we used a "%k" to indicate a hot letter, a menu string would look something 

"SPECIALS %t|Sub%kdivide (%k1)%x1|Sm%kooth Subdivide (%k2)%x2|%kFractal 
Subdivide (%k3)%x3|%Knife Subdivide%x11|%kMerge (%k4)%x4...."

A pain to read, but  readable code is not an excuse for marginal usability 
(and it's only a first approx. - please make suggestions).  Subdivide would 
be invoked by a "d" or a "1", Smooth Sub by an "o" or a "2", Knife by only a 
"k" (since it's not "famous"), Merge by a "m" or a "4".  

The third feature would no longer neccessarily be the third form the top 
anymore, but counting the features is slower than scanning the list for the 
option with the underlined "3", so it's still a plus.  And if you have to 
stop to look at the list to count them, then the "trained fingers" argument 
is moot anyway.

The return value would still be the event number,  pupmenu would do the 
translation from hot char to event.

Since updating every call to pupmenu at once would be difficult, a menu that 
specified no "hot chars" could default to the old behavior.

And yes, if we can agree on such a behavior, I'll code it.
Three rings for the Elven Kings....
     after that, their answering machine picks up.
Robert Wenzlaff        rwenzlaff@soylent-green.con