Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Customizing panel toolbars

Customizing panel toolbars

micheleXGRRK
Observer Observer
362 Views
2 Replies
Message 1 of 3

Customizing panel toolbars

micheleXGRRK
Observer
Observer

Hi there,

 

I would like to add a custom control on each panel's toolbar of the viewport in order to easily change the camera overscan. I've tried to search amongs maya mel scripts in the Maya path but was unable to find out the right procedure which is responsible for setting/modifyng the panel toolbar. Does anyone have hints and suggestions?

Using the "echo all commands" it seems like each icon makes a precise callback to a python function when pressed, but i'm puzzled.

 

Thanks in advance,

Michele

0 Likes
363 Views
2 Replies
Replies (2)
Message 2 of 3

loncy888
Enthusiast
Enthusiast

Execute the MEL code. Each of the four default view panes adds a Custom menu.

{
	string $panel = "modelPanel";
	for ($i = 1; $i < 5; $i++) {
		if (!`panel -ex ($panel + $i)`) continue;
		menu -l Custom -p ($panel + $i) ($panel + $i + "CustomMenu");
			menuItem -l Print1 -c "print \"1\"";
			menuItem -l Print2 -c "print \"2\"";
		setParent -m ..;
	}
}

I hope you found this helpful.

loncy
Message 3 of 3

micheleXGRRK
Observer
Observer

thanks a lot! I'll try asap.

Thanks for your help

 

Michele