Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Select Objects with Material but only from selection or replace material in selection of objects?

devinm3d
Participant

Select Objects with Material but only from selection or replace material in selection of objects?

devinm3d
Participant
Participant

SOS!

 

I know about the Maya Hypershade ability to "Select Objects with Material".... and I am looking for exactly that feature, BUT only on the selected objects in my scene... at the moment I have over 100k models in my Maya file that all need a material replaced on the object, and if I try to run "Select Objects with material" it breaks my Maya and freezes BAAAD...

I know a little python, but it would greatly help if someone could point me in the right direction for this. Even if its kinda a hacky way. I've got a major deadline and this would SAVE THE DAY.

 

devinm3d_0-1646451340100.png

 

devinm3d_1-1646451355868.png

 

 

0 Likes
Reply
431 Views
1 Reply
Reply (1)

mcw0
Advisor
Advisor

The logic for this would be:

1.  Get your selection

2.  Get the shader connections of your selection

3.  Loop through shaders to find the one you want to replace

4.  Reassign new shader when old shader is found.


0 Likes