@with 1.5 and 1.5.1 the best way to get the selection is the following:
for each oItem in selection
logmessage "The object name is " & oItem.name
pointsSelected = oItem.subelements
next
subelement will contain a list of the selected sub-elements, in your case the points, while the selection contains only objects.
--------------------------snip------------
I tried this on surface meshes, but there's a problem:
var selected = Selection;
for ( i = 0; i < selected.count; i++ ) {
oItem = selected(i);
LogMessage( "Object: " + oItem.name, siInfo );
points = new VBArray( oItem.subelements );
for ( j = 0; j < points.ubound(); j++ ) {
LogMessage( "Points: " + points.getItem(j), siInfo );
}
}
Here's the output for a default surface_mesh grid where the points in the positive XZ quadrant are tagged:
//INFO : "Object: grid"
//INFO : "Points: 74"
//INFO : "Points: 75"
//INFO : "Points: 76"
//INFO : "Points: 85"
//INFO : "Points: 86"
//INFO : "Points: 87"
//INFO : "Points: 96"
//INFO : "Points: 97"
//INFO : "Points: 98"
//INFO : "Points: 107"
//INFO : "Points: 108"
//INFO : "Points: 109"
//INFO : "Points: 118"
//INFO : "Points: 119"
Question: Since the U and V vectors are not separted by commas, how do you determine, for example, whether point 119 is (11, 9) or (1, 19)?
Matt
Matt Lind
Animator / Technical Director
Softimage certified instructor:
Softimage|3D
Softimage|XSI
speye_21@hotmaill.com