shader switch
Hello every,
is it possible to switch a shading material already connected to selected faces without having to re select the faces all over again? If anyone knows how this is done i would greatly appreciate. |
In Hypershade right click on the material that you already assigned and select "Select Objects with Material".
|
Or if you don't have hypershade open, you can select the shader and use this bit of code :
Code:
hyperShade -o ""; |
Cool. Didn't know about that one. Thanks
|
Guys im talking about FACES. How do i change the shaders connected to those FACES without reselecting it.
|
I'm confused, what are you asking exactly? Switching one shader out for another, or editing the attributes of different shaders that are applied to different faces on the same object?
|
Quote:
|
Guys this is quiet simple. If you have a cube primitive and you decided to apply a shader to one of its faces, how would you change that shader without reselecting it.
|
The answer is also quite simple. But there is a lot of jargon that comes with maya. If you don't understand, show a bit of humility and say "I don't get it". Dont put it back on us like we dont understand. Did you even attempt what was suggested? Probably not.
|
Ofcourse not because i already know how to do what was suggested and that is not what im talking about. Is this really hard to understand.
Every polygon object is made up of faces, edges and vertices. So let say my object is made up of 40 faces and i decided to select 10 faces and applied a phong shader to it, how do i change that phong shader without reselecting those faces again. Thank you |
ahhhh well that changes nothing then.
Quote:
|
Ahhh dame, my apologies thank guys, much appreciated
|
SOLUTION
Quote:
Select the materials you want to replace, select the target material last and run the script. With the optimize scene command in the file menu you can afterwards remove all unused shading nodes. //Copy from here to.... undoInfo -ock; $target = `ls -selection -tail 1`; select -tgl $target; $selection = `ls -sl`; for ($material in $selection) { hyperShade -objects $material; hyperShade -assign $target; } undoInfo -cck; //...Here If you don't know how to run MEL Script in Maya then watch a video on YouTube. |
All times are GMT. The time now is 09:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018