Need help with Scripted Material Plugin

Hi,
i would like to ask those who know something about scripted plugins for help.
I'm trying to create my own version of material that is based on Standard mat, just to add few extra buttons and so on. I've got most of it done, i just cannot figure it out how to create custom mapbutton.
Map button where i could drag&drop texture file and that file would be placed in, let's diffuse channel. Basically classic mapbutton behavior but in my own rollout.

Is there any chance someone could help me with simple script example?
Some additional details that may help: scripted plugin of mine won't replace UI of standard mat, just adds 1 rollout.

Thank you,
T

Edit: Plus, i would like to also ask, is there a way to open, let's say DiffuseColor rollout? Basically same as if user would click on diffuse color button in maps rollout but i would like to get there by pressing button on my rollout

TY!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
TsveTan's picture

A rollout in a material plug-in!

"When a mapButton is used in a rollout in a scripted material or textureMap plug-in, and so turn up the Material Editor, it behaves with the same functionality as sub-map buttons do in other materials and maps. This includes supporting drag-and-drop with instance/copy, and opening sub-maps if they have been assigned."

plugin superclass varname {keyword:val}
( plugin_body )

where:
superclass is one of the currently-supported plug-in superclasses:
...
Material
TextureMap
...
The drag and drop functionality works with scripted plug-ins. Is this helpful?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.