Selecting shading group (tab - not material assignments)

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2013   #1
Selecting shading group (tab - not material assignments)

So I have this script that finds the shading group of the material located on a selected face.
I can see that this is working because my "prints" gives me the correct name of the SG: lambert2SG

However, selecting this one with:
select lambert2SG
...selects all faces and objects that has the material assigned to this SG - and that's not what I want.
What I want is to get the lambert2SG tab in the attribute editor highlighted (which you reach via the hypershade > shading groups > clicking on the SG).

So exactly what kind of code would I need here for that?
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
Old 01 January 2013   #2
try: select -ne lambert2SG
__________________
blah blah blah
 
Old 01 January 2013   #3
Thanks.
That gets rid of the first part of the selection (all the faces and objects linked to the SG are no longer selected).
However, the SG tab in the attribute editor isn't selected, and it can't be selected by running any of the commands that the script editor prints out when doing a tab switch... Maybe it's not possible?
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
Old 01 January 2013   #4
with this:

select -ne lambert2SG ;

AEpropagateMenuCB -backward "" "lambert2";


is that what you wanted?
__________________
 
Old 01 January 2013   #5
Yup! Thanks a bunch!
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
Old 01 January 2013   #6
Don't ask me why I know this (ok, I wanted to modify the AE once upon a time, I was crazy, but I read through the MEL files that build it), but the AE is coded to automatically remember the last selected tab's node type and display the a matching node of that type on the connection list of the selected object if it can find one. So just selecting something doesn't do the trick.

However, if you know the exact name of the node you want to display, here's how you can do it:

showEditorExact "lambert2SG";
 
Old 01 January 2013   #7
Originally Posted by Nyro: Don't ask me why I know this (ok, I wanted to modify the AE once upon a time, I was crazy, but I read through the MEL files that build it), but the AE is coded to automatically remember the last selected tab's node type and display the a matching node of that type on the connection list of the selected object if it can find one. So just selecting something doesn't do the trick.

However, if you know the exact name of the node you want to display, here's how you can do it:

showEditorExact "lambert2SG";


This is a much better way
__________________
 
Old 01 January 2013   #8
Yeah thanks a bunch Nyro. I noticed that select -ne $SG; AEpropagateMenuCB -backward "" $SG; didn't work all the time. showEditorExact though always work!
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
Old 01 January 2013   #9
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:20 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.