Select objects by material

   2910   3   1
User Avatar
Member
81 posts
Joined: 7月 2010
Offline
How can I select all objects that are assigned a given material? I could write a script to do this, but I'm guessing there's a simpler way, I just can't find it in the docs.

Seth
User Avatar
スタッフ
4170 posts
Joined: 9月 2007
Offline
In the material palette, you can select a material that was created, and poke ‘Select’ to select any materials that have it.

However, if it wasn't created through the material palette, I'm not sure how…

Does that help?
I'm o.d.d.
User Avatar
Member
21 posts
Joined: 2月 2012
Offline
Seems like you could look at the shop_materialpath primitive attribute and do a string comparison? Group the geometry using an expression to select all primitives that match the correct string pattern?

http://www.sidefx.com/docs/houdini12.0/expressions/strcasematch [sidefx.com]
User Avatar
Member
81 posts
Joined: 7月 2010
Offline
Thanks all for the pointers. My current shaders were not created with the material palette, so I may have to go with a scripting solution.
  • Quick Links