# Need Some Help Hacking Hypershade

**URL:** https://forum.highend3d.com/t/need-some-help-hacking-hypershade/1714
**Category:** Maya
**Tags:** mel
**Created:** [January 28, 2008, 11:30am UTC](https://forum.highend3d.com/t/need-some-help-hacking-hypershade/1714 "2008-01-28T11:30:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [January 28, 2008, 11:30am UTC](https://forum.highend3d.com/t/need-some-help-hacking-hypershade/1714/1 "2008-01-28T11:30:54Z")

</div>

Hi !  
I need some help with modyfying hyperShade panel. I wanted to add a shelf, just below top toolbar. I tried inserting some code in different places, mostly in addHyperShadePanel procedure, where mainform layout is created, but always maya refuses to startup. Can anyone point out exactly what has to be placed where ?   
I need that shelf, or anything else that allows me to easily add new buttons. Previously I was manually adding buttons in createToolbarFormContent proc, but it's messy, and since maya2008 there's not enough space for my buttons.

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 28, 2008, 8:02pm UTC](https://forum.highend3d.com/t/need-some-help-hacking-hypershade/1714/2 "2008-01-28T20:02:15Z")

</div>

look on line 8400 in hyperShadePanel.mel quickly testing with runtime code following seems to work:

CODE  
proc test(){  
shelfLayout -p hyperShadePanel1Window|TearOffPane|hyperShadePanel1|hyperShadePanel1|mainForm  
 -h 42 extraShelf;  
formLayout -edit  
&nbsp;&nbsp;&nbsp;&nbsp;-attachControl hyperShadePanel1Window|TearOffPane|hyperShadePanel1|hyperShadePanel1|mainForm|separator3  
 "top" 1 hyperShadePanel1Window|TearOffPane|hyperShadePanel1|hyperShadePanel1|mainForm|extraShelf   
&nbsp;&nbsp;&nbsp;&nbsp;-attachControl hyperShadePanel1Window|TearOffPane|hyperShadePanel1|hyperShadePanel1|mainForm|extraShelf   
 "top" 1 hyperShadePanel1Window|TearOffPane|hyperShadePanel1|hyperShadePanel1|mainForm|toolbarForm   
 hyperShadePanel1Window|TearOffPane|hyperShadePanel1|hyperShadePanel1|mainForm;  
}

tearOffPanel "Hypershade" "hyperShadePanel" true;  
evalDeferred("test();");

BE careful with the lines they are very long and the fum splits them inapropriately so you need to reformat them

PPS: you can open a file tab in the editor it more or less does the same thing since opening a mel in there executes it. saves you changing anything tough. So its easy to implement + your swatches can have much more resolution and are easy to manage.

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [January 29, 2008, 7:55pm UTC](https://forum.highend3d.com/t/need-some-help-hacking-hypershade/1714/3 "2008-01-29T19:55:56Z")

</div>

thanx !  
this works, I now have a nice shelf below toolmar  
yesterday i was trying to do smth. very very similar, and it didin't work - no idea why.
