ScriptSpot home

SelectObjectsByMaterial

Downloads

3ds Max compatibility
Unknown
Report a problem
Community compatibilityNo compatibility reports yet

No reports yet for the available releases.

Community reviewsNo reviews yet.

Listing details

Version
1.0
Author’s update date
Legacy votes
13
Listing created
How compatibility works

Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.

“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.

Community reports record successful tests on specific releases.

Posted by

colinsenner

Colin Senner

More by this author

This script extends and improves the functionality of the button in the material editor labeled "Select by Material". I was always frustrated by this button because to effectively get every object with a specific material applied I always had to unfreeze/unhide everything, and on heavy scenes, this proved to be difficult. Also, using this functionality is rough because it will only select the group head if an object that has the material applied is part of a group, resulting in me mistakenly assigning materials to whole groups.

This script allows you to select the material, click the button and have all the objects that material is assigned to selected (even if they are hidden or frozen), if the objects happen to be a part of a group, it will open every level of the group till it gets to the object with the assigned material, and select only it.

Setup & notes

To Use:
Run the script, goto Customize->Customize User Interface, Toolbars, Group: "Main UI", Category: "All Commands", drag the item "SelectObjsByMaterial" to a toolbar, or alternatively assign it to a QUAD menu.

Now, open the material editor and pick an object assigned to something in your scene (doesn't matter if the object is hidden/frozen/grouped etc.) and click the hotkey, the result will be you will have every object in the scene with that material selected (even if you can't see them, they are still selected).

Alternatively if you assign this script to a quad, you will also have an alternate box, if you use the alt box from the quad, it will automatically unhide/unfreeze all the objects making sure you can see them, so you know exactly what you're affecting.

Comments (18)
Waseem Dabbas

I'm looking the same script but to select same materials that used by clicking on object without opening material editor, any idea?
I mean
1. select object which has material needed
2. click on script button
3. All objects that have material to the selected object will be selected.

Hope I could describe it in a good way.

Haider Alghifary

.

Hi Colin,

No, I meant if I have a multisub-material that is assigned to a certain amount of objects.
Now, I want to find the objects that have a certain sub-object material assigned to them.

Haider Alghifary

.

Hi!

Could you please improve your script so that it can select what object uses a certain sub-object material?

Currently, I use this solution:
http://www.polycount.com/forum/showpost.php?p=1521792&postcount=12
... that creates a multi-sub-object material for all items in the scene and gives the items an equivalent material ID.

Now, the tricky part is to find the item that uses a certain material ID.

@fajar: regarding "Select by material without open the material editor". I cant make the code work.
Could you please help out?

Reply to Haider Alghifary
Colin Senner

I run this script on the entire object (with the multisub material) then I usually just go into face selection mode and click the face I need the material for and check the id manually.

Florian Dubiel

Awesome !!!!

I am a former Maya user and this functionality is painful missing in Max. Simply select all objects with a certain material assigned. How can you work without? How else can you replace materials? Max is strange

chalid

thanks..another useful n efficient way from you :)

Reply to chalid
Colin Senner

Glad to hear. This is one script I really really use alot.

Reply to Colin Senner
igamaximus

Max 2012

Colin, is it possible to make this useful script work on Max 2012? I've tested and it seems it's nonworking there.

Thanks for your time and effort.

Reply to igamaximus
Colin Senner

2012

Yeah, let me get my hands on 2012, and I'll see what I can do.

-Colin

one808

good tool ,trying

fajar

Select by material without open the material editor:

rollout MapBySel "Misc Tool"
button MapSel "Selection" toolTip:"Click: Select by Material"

on MapSel pressed do
(
if selection.count==1 then
(
select (for o in objects where o.material==selection[1].material collect o)
)
)
CreateDialog MapBySel

70086504

good tool

Dave Buchhofer

Yay Colin, yet another one of the "why isn't this hotkeyable, lets go see if anyones made it already" script ideas that you have already done.

 

Thanks 

Reply to Dave Buchhofer
Colin Senner

Yeah right? I've got a ton of em, that honestly...should be standard by now. I love this script, I probably use it more than most.
Good hearing from you vsai.
-Colin

Colin Senner

Thanks a lot wine3d! I'm glad you've found it. (It really has helped my workflow a lot too :))

-Colin

wine3d

good tool!