[Closed] materialbutton doesn't support drag/drop
Hi,
I have a “materialbutton” button in my roll up interface for MaxScript, but it will not accept materials dragged and dropped from the material editor. I can also not drag the material from the roll up to the material editor.
I’m not using a parameter block.
Is there a way to get this working?
As far as I can tell it’s impossible. I’ve tried many times before with no success.
Yeah, sadly I ran into the wall too with this when writing SME. Unfortunately maxscript doesn’t offer any kind of mat/map drag’n’drop support with buttons or otherwise.
That sucks.
I added a little button to the side of the materialbutton, which will open the material editor and place the material in slot #1. Does anyone know how to make slot #1 the active material in the editor.
Interface: medit
<void>SetActiveMtlSlot <index>slot <boolean>forceUpdateThis method allows you to set the active material slot.
<index>slot : The material slot index.
<boolean>forceUpdate: Set this to true to update the slot contents.
<index>GetActiveMtlSlot()This method returns the index of the active material slot.
So it should simply be:
if medit.getactivemtlslot() != 1 then (
medit.setactivemtlslot 1 true
) else (
ok
)
-Eric
Thanks! I read that in the manual, but forgot that use to “medit” interface. Arg…:eek: