View Full Version : MEL: How do I make a will card selection??
nelsonteixeira 01-22-2003, 07:36 PM I´d like to select all the polySmooth nodes from the selected objects in a scene. How should I do???
|
|
dwalden74
01-23-2003, 08:14 AM
Select the objects´shape nodes together and type:
listConnections -type "polySmoothFace";
Or to select all polySmooth nodes in the scene, type:
ls -type "polySmoothFace";
:beer:
David
dwalden74
01-23-2003, 08:18 AM
listConnections -type "polySmoothFace";
Oops, this won´t make a selection though :wip:
So either do this (while shapes are selected):
select -r `listConnections -type "polySmoothFace"`;
or this:
string $smoothies[] = `listConnections -type "polySmoothFace"`;
select -r $smoothies;
:beer:
David
alexx
01-23-2003, 09:27 AM
if you wanna be more dirty (and it presumes, that only the polySmooth nodes are not renamed and there are no other nodes called polySmooth):
select "polySmoothFace*";
but as mentioned: that is the dirty way..
davids way is more predictable :)
cheers
alexx
MDuffy
01-23-2003, 04:28 PM
There are a couple steps you need to do in order to get at the polySmoothFace nodes. First of all you need to get the shape nodes rather than the transforms, because that's where the polySmoothFace nodes are hooked into. Then you can trace back the connections with listConnections. So you have something like this:
{
string $listSelection [] = `ls -sl`;
string $listShapes [] = `listRelatives -shapes $listSelection`;
string $listPolySmooths [] = `listConnections -shapes true -type "polySmoothFace" $listShapes`;
print "Selection\n";
print $listSelection;
print "Shapes\n";
print $listShapes;
print "PolySmooth Nodes\n";
print $listPolySmooths;
}
Hope this helps!
Michael Duffy
mduffy@ionet.net
CGTalk Moderation
01-14-2006, 06:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.