View Full Version : Drag and Dropping Materials
03-19-2009, 03:32 PM
I've created a nice little interface to help streamline our rendering process.
I've got a few materialmap buttons for assigning enviroment maps, override materials etc.
Got these working fine, can pick and assign the material, and get it's name etc. I now want to be able to drag materials onto these materialmap buttons and drag the material from my button into the material editor, so just to get it working like a normal mapbutton.
03-19-2009, 03:50 PM
I think you may be stuck without drag&drop - that only works if the scripted material/map button is in the material editor?
Edit: The only partial work-around I can think of is pretty crap. Use an imgtag / .Net button to detect mouse down and mouse up events.. if a mouse up event was generated without a mousedown event, make the assumption that the user dragged a material onto the tag/button... and make another assumption that said dragging is from the medit sample slots and thus would be meditmaterials[activeMeditSlot].
Yep - entirely too many assumptions ;\
03-19-2009, 04:01 PM
Yeah it's a bit rubbish really.... Can I at least get the right-click copy/instance/paste working at all?
I can write a write-around, but it's frustrating...
03-19-2009, 04:15 PM
don't think so.. though you could pop up some menu on right-clicking the material/map button, I'm not sure where one would go from there. There's no access to the internal material and map 'clipboards' that I can spot, nor does there seem to be a callback that'd get triggered on 'copy' that might hold a reference to what got copied.
I'm curious as to your work-around.. short of placing something in medit and having the artists interact with that.
03-19-2009, 04:28 PM
Well we work with VRay, and whenever you choose an HDRI for a reflections override, you have to drag n drop that material into the material editor to actually doing anything with it, so i might just get it to automatically populate one of the last 3 slots with the material and save a step anyway.
Little things like this in max really frustrate me, surely all map/material buttons should be draggable/dropable and have the copy/paste function inbuilt..... grrr. oh well...
03-19-2009, 06:56 PM
wonder what happens when you try to drop a material on a dotnet control.. .net must return some funky value for what just got dropped, presumably; unless max's drag&drop background worker simply determines the .net control won't support it anyway
03-19-2009, 07:40 PM
Another thread discussing a couple of approaches to get drag and drop to work:
03-19-2009, 07:40 PM
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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.