SelMaterial? Select objects by material?

There was a very nice script to select object by material (similar to SelColor, but for objects with assigned materials) that used to work flawlessly years ago, but it no longer works in Rhino 7. Maybe something has changed since then? It returns the following error:

Here is the script:
SelMaterial.rar (23.2 KB)

Normally you can find the material you are looking for in the materials panel and choose “Select objects”.

Here is a script which will select all other objects that have the same material as selected object(s).
SelObjsWithSameMatl.py (1.5 KB)

1 Like

Great! Works just as expected. :slight_smile: Thank you!

Could it be made to also select objects with no material? By default Rhino sets all the new models to “Use layer material”. Or, is there a way to select all objects without material applied?

Here are a couple to try:
SelObjsWithoutMatls.py (472 Bytes)
SelObjsWithMatls.py (469 Bytes)

2 Likes

These also work great! Thank you again! :slight_smile: Both are very important scripts. Rhino should have them by default.

Do you mind if I share them in this topic?

1 Like

Feel free to share them wherever you like…

1 Like

Thank you for contributing to the community! :slight_smile: