pick material button
hello,
I try to find a button te get a material. okay, there's the materialbutton. but once picked you cannot modify the material. also you can't drag and drop it in the materiallib or copy it. I've made a copy material button (mat = meditMaterials[spnMatSlot.value]) but not exactly what I want.. so does anyone knows how i can gat such a getmaterial button? thanx
Comments
where is the problem?
What you mean by "once picked you cannot modify the material"? If your MaterialButton is named for example
matBtn1
then the picked material is stored in it #material property, so to access it just say:matBtn1.materail
.As for the drag-n-drop, yep, no such feature for any of the scripted rollouts controllers, but where is the problem?
The MaterialButton just popup Mat/Map Browser dialog and there you can specify from where to pick the material (library, editor, active slot, scene, selected object, or even from new).
Well, if you want to control the Mat/Map Browser dialog then you'll need regular ui Button and call to
materialBrowseDlg
andmtlBrowser.browseFrom
.Here is an examples, but check the help file for detals.
my recent MAXScripts RSS (archive here)
a more userfriendly approach
thanx for reply Anubis. yes I know calling the materialBrowseDlg.
I was wondering if there was a drag and drop possibility.
it's not a problem that i can't get it working,
but more user-friendly.. sorry if I wasn't clear enough
is it possibly with the sdk?
ok ;)
yep, with the sdk drag-n-drop is built-in.
my recent MAXScripts RSS (archive here)