PDA

View Full Version : Selecting poly's by seleting surface



moremetall
05-12-2006, 05:12 AM
Hi !
Is ther any way to select poly's by selecing surface in surface editor?

BeeVee
05-12-2006, 06:21 AM
hit w in Modeler...

B

riki
05-12-2006, 07:05 AM
There's some thrid party plugs about as well. Try a flay search.

moremetall
05-12-2006, 08:07 AM
Hi
Thanks BeeVee, that was what I needed!

riki, I will take a look at flay as well.

riki
05-12-2006, 08:13 AM
here's one




//-----------------------------------------
// SelBySurface.ls
// Carl Merritt, [email protected]
// will select polygons of like surface name,
// based upon last polygon selected.
//

@version 2.2
@warnings
@script modeler

// global values go here

main
{
selmode(USER);
polyCount = polycount();
editbegin();
polyfo = polyinfo(polygons[polyCount[1]]);
editend();

selpolygon(SET,SURFACE,polyfo[1]);


}

riki
05-12-2006, 08:14 AM
And another



@warnings
@version 2.1
@script modeler
@name Select Color

main
{
surfSel = 1;
var surfStore;

editbegin();

ttlPnts = pointcount();
if(!ttlPnts)
{
error("<br>You must have geometry to perform this operation.");
return;
}

editend();

x = 1;

surfObj = Surface();

while(surfObj)
{
surfStore[x] = surfObj.name;

surfObj = surfObj.next();

x++;
}

reqbegin("Select by Surface Color");

c1 = ctlpopup("Surface",surfSel,surfStore);

if(reqpost())
{
surfSel = getvalue(c1);
}
else
return;

reqend();

selColor = Surface(surfSel).getValue(SURFCOLR);

surfObj = Surface();

numSet=0;

selmode(USER);

while(surfObj)
{
surfColor = surfObj.getValue(SURFCOLR);
if(surfColor == selColor)
{
selpolygon(SET,SURFACE,surfObj.name);
numSet++;
}
surfObj = surfObj.next();
}
}