Introduction to Maya - Modeling Fundamentals Vol 2
This course will look in the fundamentals of modeling in Maya with an emphasis on creating good topology. It's aimed at people that have some modeling experience in Maya but are having trouble with complex objects.
# 1 23-11-2010 , 04:55 PM
Join Date: Dec 2004
Posts: 203

selecting faces that are assigned by a shaader through mel

It has been awile since Iast visited, but I have question. I know it is possible to select the faces of an object that are assigned to a shader group in the hypershade window, but how do you do it in MEL? I tried looking at the script window, but it writes this....

select -cl; select -r polySurface.f[5:9]

which does not help me, because in my script it does not know which faces should be selected. My script is based on knowing the name of the assigned shader. Also, I tried googling it and found one person, on a different forum, and he mentioned to use hyperShade -smn (name of shader). I tried doing that and nothing happens.

Does anybody else have an idea how this is done?

# 2 24-11-2010 , 02:40 AM
bullet1968's Avatar
Lifetime Member
Join Date: Feb 2010
Location: Australia
Posts: 4,255
I know NOTHING about MEL mate but I tried this...made a simple cube and assigned different colours to the faces...and experimented whilst watching the script window and came up with this...and it worked....dunno why you want to use the script editor though mate??

select -r pCube1 lambert4SG;

so I assume pCube1 is the model and then I just typed in lambert4SG and it highlighted those relavent colours...hope this helps

cheers bullet


"A Darkness at Sethanon", a book I aspire to model some of the charcters and scenes
# 3 27-10-2014 , 12:03 PM
Join Date: Apr 2013
Posts: 1
Hey thanks for the tip guys ,

Just ran into the same problem , i guess hypershade -objects(-o) will do the trick !

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads