Notifications
Clear all

[Closed] Is it possible to override Right Click menu for bitmap slot?

Anyone know what interface/option would override the default menu option for the Right Click context sensitive texture slot buttons one finds in a directX material. I would like to add a “Clear” option that would set the “None” slot (or whatever is currently entered into that slot to a texture of my choice.) I can do this through other tools, but I”d like it to be integrated into the UI if possible.

I am hoping to override a collection of different directx files at once.

I’ve included an image of the RC Menu I’m hoping to override. I thought menuMan may have been the right direction – ? Maybe involves extending a plugin class? using a delegate… Maybe this isn’t possible? Any advice would be welcome.

4 Replies
 lo1

Menuman does not cover right-click non-quad menus as far as I know.
The chances you can pull this off with pure maxscript are very slim.

Yeah, i think so too – looks like it’s all hardcoded in it’s own plugin ( Map Material Clipboard )
stdplugs/MapMatCol.gup

OK. Thanks for the feedback – I had a feeling that the chances were low. I have some alternative solutions, just not as elegant.

It’s possible. What you’re going to need is a button functioning as a map button. You can use and render a map to that if you want a preview as well.

Here is some useful commands:

rcmenu <var_name> ( <rcmenu_body> )

–In Rollout context
button <name> [ <caption> ] [ images:<image_spec_array> ]
[ toolTip:<string> ] [ border:<boolean> ]

If you’re planning on doing this in the broader context of max, ie for all parts of your material editor then it’s going to be a lot of work as you’re going to have to re-write interfaces for every place you interact with the bitmaps.

For example; your ‘bitmaptexture()’ is going to require a fully recreated scripted plugin just to insert your own behaviour into the rcmenu.

If this is for your own utility though, no problem. Just switch from a mapbutton to a button and write the way you want it to function.

From what I’m assuming here, the most difficult feature to replicate, asides from the length of time to write all the code will be the paste functionality.