SelectObjectsByMaterial

13 votes
Version: 
1.0
Date Updated: 
12/14/2007
Author Name: 
Colin Senner

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.

Additional Info: 

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.

Video URL: 
AttachmentSize
SelectObjectsByMaterial_v1.0.ms1.56 KB

Comments

Comment viewing options

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

good tool ,trying

good tool ,trying

summer

colinsenner's picture

Also Fajar, mine does

Also Fajar, mine does multiple objects as well, it's pretty handy.

colinsenner's picture

Yeah right? I've got a ton

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

fajar's picture

Select by material without

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's picture

good tool

good tool

vsai's picture

Yay Colin, yet another one

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 

colinsenner's picture

Thanks a lot wine3d! I'm

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

-Colin

wine3d's picture

good tool!

good tool!

Comment viewing options

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