Send Selected's Material to Clean Material Editor

Hey guys,


I just thought of a little script I thought would be fairly easy to code, and potentially useful to many:  

Basically, all it would do is grab the material from any selected object, then open it (solo) in an otherwise clean material editor (default materials in all but active slot).

I hate  opening a cluttered (and slow-loading) material editor, simply to adjust one texture, and while I've been using MarkD's helpful "MatClean" regularly, a script such as the one I'm suggesting would cut a couple steps out of the process (right-click "Send Selected's Material to Clean Material Editor", vs. open MatClean floater, select "Clean Editor", select "Get Material From Selected".

Well, that's about it in a nutshell.  I hope someone finds the idea worthwhile!

Brittnell

Comments

Comment viewing options

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

OK, so no one seems too

OK, so no one seems too interested in this other than me, so I've gone ahead and tried my (MaxScripting Caveman) hand at doing it myself.  

I'm sure the script is janky looking, but it seems to work like I'd expect.  

The only thing I'd really like to figure out now, is how to make this available in my viewport quad.

(edit)

Sigh... Now it seems to make Max crash when run.  Hmmm...

 

AttachmentSize
SelectedMaterialEdit.ms 248 bytes
Marco Brunetta's picture

How about macros.run "Medit

How about

macros.run "Medit Tools" "clear_medit_slots"
MatEditor.Open()
IF selection[1] != undefined AND selection[1].material != undefined DO meditMaterials[1] = selection[1].material

Try to stay off the macro recorder as much as possible... it's better to look for the right commands in the maxscript reference

brittnell's picture

Wow, that seems a lot

Wow, that seems a lot smoother and stable. 

Thanks!

Now I've got two things to figure out:

1) Work with multiple selected objects (sending each object's material to its own slot in a clean editor).

2) Add to right-click quad.

Since I know pretty much 0 about scripting, I think I've got a lot of reading to do!

Surprised

Cheers!

DotScott1's picture

DO WANT!

I am REALLY interested in something like this! It would definitely speed things up! You could select a group of multiple objects, hit a shortcut key and it puts all of the materials from selected into material editor slots. oh it would be beautiful. I will be trying to setup a script that will do this but it may take a while (pretty new to this). Hope someone else can help!

I made an edit to the other script on this page. This was you can drag and drop it into max and have a button or shortcut key applied to it:

macroScript SelectedMaterialToSlot
category:"MyTools TSN"
buttonText:"TSN_SelecedMaterial"
toolTip:"Send Selected Material to M-Editor Slot"
(
macros.run "Medit Tools" "clear_medit_slots"
MatEditor.Open()
IF selection[1] != undefined AND selection[1].material != undefined DO meditMaterials[1] = selection[1].material
)

AttachmentSize
putmaterialfromselectedtoeditor1.ms 330 bytes
DotScott1's picture

DONE

Here you go! Puts materials from multiple objects into material editor. Could be made better. Maybe I'll add some stuff later.

AttachmentSize
tsn_putmaterialfromselectedtoeditor2.ms 464 bytes

Comment viewing options

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