hotbox question..


#1

anyone know if there is a default .mel file for the the Showbox/Hidebox (I believe those are the names) commands? I want to modify the hotbox so instead of switching viewports, it will select (edgeloop, or something) depending on what is selected.

Cheers


#2

The marking menus in the hot box are editable from the marking menu window ( settings\preferences > MarkingMenus) just create a new Marking menu with all the commands you want in it, and then assign it to hotbox center. another cool thing with marking menues is that you can assign them to different mouse buttons, so for the same hotkey, or location in the hotbox you can have 3 different menus


#3

Aye, I’m familiar with the marking menus, however, what I want to do is make it so that when I tap the space bar, instead if switching view ports, it does something else…


#4

as I recall, then the hotbox is not availible for custom made markingmenu’s… you can however add/change items to the existing hotbox…

unfortunately it also seems, that you also only have two mouse buttons for the markingmenus, since the “right”-mousebutton is reserved… (you can however change and add things to that aswell)
e.g. macaroniKazoo has made a example here… adding items to the RMB menu, customising the RMB popup menu

if you want to make your own hotbox, I’m affraid you’ll have to make a whole new melfile(s), you can e.g. take a look in this folder… -->
~\AliasWavefront\Maya5.0\scripts\startup

for these files…
[ul]
[li]HotboxCenterMenu.mel[/li][li]HotboxControlsMenu.mel[/li][li]HotboxEastMenu.mel[/li][li]HotboxMenus.mel[/li][li]HotboxNorthMenu.mel[/li][li]HotboxRecentMenu.mel[/li][li]HotboxSouthMenu.mel[/li][li]HotboxWestMenu.mel[/li][/ul]

somehow you’ll have to intergrate the things from the “HotboxCenterMenu.mel” into your file, because a regular markingmenu doesn’t support it yet… (atleast not that I know of at the moment… would be great if I’m wrong on this)… :slight_smile:

regards

Alex


#5

oki doki… :slight_smile:

then it’s the file “HotboxCenterMenu.mel” you’ll have to change/modify… :slight_smile:

regards

Alex


#6

I think I found it, its a variable called panePop.mel under scripts/startup. It has the information for what happens when you tap the spacebar. Thanks for the help.


#7

btw, the Right Mouse Button is available in the Hotbox, but you have to uncheck “Center Zone RMB Popups” under Hotbox Controls -> Hotbox Style.


#8

btw, the Right Mouse Button is available in the Hotbox, but you have to uncheck “Center Zone RMB Popups” under Hotbox Controls -> Hotbox Style.

yup, but the hotbox is not a regular MarkingMenu, as the other markingmenu’s… e.g. what I meant to what I wrote earlier, regarding the markingmenu and mousebutton’s, is that you can assign a markingmenu to a hotkey & mousebuttons, however only to the left & middle mousebuttons to activate it… in this case the right mouse buttons is reserved… as I recall this is because of the popupmenu command… (however this can in some occasions be overruled e.g. nomatter what key you hold together with the alt-key to create a hotkey, all the mousebuttons will react the same way… just like when only pressing the alt-key alone)…

e.g. in this case the hotbox get’s activated by default, by pressing the space bar, and no mousebuttons involved in the activation…

but you can get the hotbox to react differently, regarding which mousebutton is pressed, in different regions of the hotbox… e.g. via the “markingmenu” editor…

I think I found it, its a variable called panePop.mel under scripts/startup. It has the information for what happens when you tap the spacebar. Thanks for the help.

that file will not help you much, if you want to change the content of the center of the hotbox… because that code is in the “HotboxCenterMenu.mel”…

btw. I forgot this file… -->
“menuEditorWnd.mel” from the folder ~\AliasWavefront\Maya5.0\scripts\others… this is also related to the hotbox and some other stuff… and there’s some more files… I will see if I can find some notes I did a couple of months ago, when I worked on a markingmenu system… as I recall there’s a file more regarding the hotbox which specify some more stuff related to the hotbox… :slight_smile:

regards

Alex


#9

Not to be rude, but I think you’ve misunderstood what it was that I was looking for. I have infact found it, and it is this one simple command in the HotboxMenus.mel:

hotBox -noClickCommand “panePop” -noClickDelay 0.4;

What that command does is switch panels when you hit space (by default, when you hit space, it switches from perspective view, to four view. I’m sure you’re aware of that)

if I change the command to:

hotBox -noClickCommand “toggleSelMode” -noClickDelay 0.4;

it will toggle between object/component mode whenever I hit space.


#10

Hi Iconoklast,

oki doki… :slight_smile:

yup I have apparently misunderstood you, thought you wanted to change the content of the center area of the hotbox… sorry for that… :slight_smile:

first I thought you wanted to make a “hotbox center” alike thingie for a marking menu… (have been looking for a solution to that myself)… :slight_smile:

now when I’m reading thru all the posts, I can see I have read something wrong, and misunderstood it… I was properly to focused on the center thingie… :slight_smile:

btw. you can also make the command react depending on what kind of panel you are in, if you want to… :slight_smile:

regards

Alex


#11

No worries, I’ve been known not to express myself very well. Either way, learned some things due to this thread, so something gained!

the toggleSelMode seems to be more handy that the panelPop. What you mentioned about having it react depending on the panel is an interesting idea, but I would have no idea how to go about it… :frowning:


#12

Hi Iconoklast,

to find out what the different panelTypes are, you can e.g. use this code, which you can assign to a hotkey or something, and then use the hotkey when you have your mouse over a panel, and test what the result of the panels are… (e.g. grapheditor, outliner etc.)…

proc daPanelType()
{
	 string $daCurPanel = `getPanel -up`;
	 string $daPanelType = `getPanel -to $daCurPanel`;
	 print("current panel is of the type "+$daPanelType+":
");
}
daPanelType;

you can use two flags either -up (underPointer) or -wf (withFocus), in this case I have chosen the underPointer flag… :slight_smile:

and then in the code you only what to react, if a specific type of panel is under the mousecursor…

if ($panelType == "the result from the code above") //e.g. "modelPanel"
{
   //your specific code here
   //etc. etc. ...
}

if you also want it to be specific to the mode it is in… you can use this command

setMenuMode;

this returns the current mode that is used… then you could e.g. based on first the mode you are in, and then afterwards what panel type you are over when activating your code… e.g. like this… -->


proc myProcThingie()
{
	 string $daMode = `setMenuMode`;
	 string $daCurPanel = `getPanel -up`;
	 string $daPanelType = `getPanel -to $daCurPanel`;
	 //animation mode...
	 if($daMode == "Animation")
	 {
		//modelPanel
		if($daPanelType == "modelPanel")
		{
				//do stuff
		}
		//modelPanel
		if($daPanelType == "outlinerPanel")
		{
				//do stuff
		}
		//etc...
	  }
	  //modeling mode...
	  if($daMode == "Modeling")
	  {
		//etc...
	  }
	  //etc...
	 else{ //do stuff}
}
myProcThingie;

and then you could e.g. have your space tab code like this

 hotBox -noClickCommand "myProcThingie" -noClickDelay 0.4;

hope that helps a bit… :slight_smile:

regards

Alex


#13

amazing! thanks a lot, been very helpful :bounce:


#14

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.