Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
You are here > Home > SimplyMaya Community Forums

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 23-11-2010, 04:55 PM   #1
Join Date: Dec 2004
Posts: 203
Thanks: 0
Thanked 3 Times in 3 Posts
Exclamation 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?
junkyBob is offline   Reply With Quote
Old 24-11-2010, 02:40 AM   #2
Lifetime Member
bullet1968's Avatar
Join Date: Feb 2010
Location: Australia
Posts: 4,255
Thanks: 158
Thanked 651 Times in 621 Posts

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
bullet1968 is offline   Reply With Quote
Old 27-10-2014, 01:03 PM   #3
Join Date: Apr 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Hey thanks for the tip guys ,

Just ran into the same problem , i guess hypershade -objects(-o) will do the trick !
AlexSudnikov is offline   Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keep faces on Sircharles Maya Basics & Newbie Lounge 2 07-12-2010 01:20 PM
MEL headache!! happymat27 Mel Scripts & Programming 1 03-12-2010 04:41 PM

Thread Tools

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2017 SimplyMaya - vBulletin® Copyright © 2000-2017, Jelsoft Enterprises Ltd.