Select By Material

6 votes
Date Updated: 



- Select multiple node/s in SME.

- Unhides and hides objects on scripts second run.


Script which allows easy selection of materials inside Slate Material Editor and Compact Material Editor over 3ds max standard method.

Benefits over maxes built in way:

  • Auto open/closes groups.
  • Auto unhides/hides objects on scripts second run.
  • No annoying select from scene dialog after 3ds max method.
  • Keyboard shortcut by macro. (Max does not have this, at least I can't see it).
  • Works seamlessly in any workflow.
  • See Video below on usage.

PS. I have the script mapped to SHIFT + M for ease of use.

Please drag v1 .mzp file to max window and click unistall. Than drag v.1.1 to max window to fresh install it if updating to 1,1.


For other later versions, simply just use the lastest .mzp (v.1.1+) file and drag into 3ds max UI to install.


Additional Info: 


Version 1.0 - 2015.07.24

- First Release. (Select your objects quickly + auto-open/close group heads)

Version 1.1 - 2015.07.25

- ADDED: Support for groups that were previously opened while still closing the groups affected by the script.

- ADDED: Object count in listener.

- ADDED: Support for Compact Material Editor, you can now toggle back and front between them with no problem.

- ADDED: Warning that no object/s with selected material exist in scene.

- CHG: Script name to 'Select By Material'.

- ADDED: Querybox to open material editor if not opened.


Version 1.2 - 2015.08.29

- CHG: Supports max 2014 only, this is due to 2014s getSelectedNodes() array in max.

- CHG: Output results of the no. of items selected and materials names in a messagebox instead of listener. Listener if only one material node is selected.

- ADDED: Multiple selection of material nodes in SME now supported like normal method, only much quicker.

- ADDED: Support for Environment Maps where added to the environment slot.

- REMOVED: Selection of sub materials in Multi-Sub objects after changing to selection of nodes.

- BUG FIX: Works with spaces in SME views name.

Version 1.3 - 2016.11.15

- ADDED: Unhide objects and hide again on scripts second run.

 Version 1.4 - 2016.11.27

- BUG FIX: SME select function now works on objects as opposed to geometry only.

- BUG FIX: Made sure o.parent is a valid Grouphead prior to collection.

- BUG FIX: Deleted scene objects are removed from arrays.


Quick Mat Select Test_2012.max file attached for you to try it out.

Hope you enjoy it and any requests please let me know. :)

Version Requirement: 
Dev. in 2015 (But will work for 2014+ only)
Video URL: 
mat_select_test_2012.max1.35 MB
selectbymaterial_in_sme_v1.0_by_3dwannab.mzp52.72 KB
selectbymaterial_v1.1_by_3dwannab.mzp52.91 KB
selectbymaterial_v1.2_by_3dwannab.mzp54.58 KB
selectbymaterial_v1.3_by_3dwannab.mzp54.79 KB
selectbymaterial_v1.4_by_3dwannab.mzp54.95 KB


Comment viewing options

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

Does it automatically open

Does it automatically open group heads / unhide objects? And then close group / re-hide objects on second run.

My script also doesn't have that annoying select from scene dialog either and it mappable to a hotkey :)

spacefrog's picture

Select By Material has been

Select By Material has been fixed in 3ds Max 2017 SP3 finally !
So update 3ds Max 2017 to SP3 and you should'nt need to use this script

Not fixed for the latest Max 2016 SP though

3dwannab's picture

I'm still using 16 so I

I'm still using 16 so I wouldn't know. Did you try it?

ltchest's picture


would this work in max 2017 ? im finding the native select by material in max 2017 is not working.

3dwannab's picture

I'll look into it. Thanks for

I'll look into it. Thanks for the feedback.

Maybe it's me but leaving groups open is a pet hate of mine. And with the standard material editor. I didn't think many people still use that but will see if I can put that in also.

I was having a hard time getting the name of the group head also which is why I choose the method I did.

pixamoon's picture


let say you have groups opened before running your script,
script will open some groups to select objects inside,
when you choose new material all groups with previously selected items will be closed (even groups which was open before running script - they shouldn't be closed)

there is function isOpenGroupMember
this way you can collect opened groups heads and not close it on the end

also there is setGroupOpen $Group true (or false) to set it open or close and you don't need to select group heads

What more will be nice - your script can work with standard MaterialEditor and SME - it can just automatically read which one is active. This way it will be more universal :)

3dwannab's picture

Thanks buddy..

It has the previously selected items in a global array so it only affects what was opened with the script beforehand and not by the user elsewhere. Is that what you mean?

It was extremely difficult for me to get it to work but I found a method which uses the 'max group open' and 'max group close' commands.

Also, how max handles groups is clunky at best and maxscript is no different. Especially with nested ones. This works with nested groups so I was happy to get it to work :)

pixamoon's picture


very good idea :) +1

one suggestion - will be good if it checks if groups are open or close to not close all when you choose next material

good luck!

Comment viewing options

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