Nodes using selection

I was working on some procedural stuff in maya... Anywat i selected a buch of edges that i wanted to extrude. Now the tropology changes under the course of the animation, and oofcourse the indexes of selections change during the course of the flow.

Now is there any way to use a script to pass the edges I need to the extrude node? If so how.

Also I wondered could this kind of connections be made using the api since i considered making a selector node that would use volume as a source for the selection. Would this be possible... and does anyone have a clue, or tips regading this. Bacuse i was considering such an approach.

MAX has a volume select tool/modifier. It is very useful. Unfortunately, I don't know anything about the nuts and bolts of how it works, but if you have access to MAX, you might want to give it a look.

--JeffD

Yeah I know but i was looking to do a bit more complex things, but something along that. Im still to totaly figure out how the geometry is passed to nodes exactly and how to affect this.

Basicaly i want to use a praticle object to emit selection a small amount outward to caccount for slight jitter. The areasob for this is that the amount of vertices in my object change during the course of the animation (im turning parts of historyon of in a sequence), this totaly screws the selections since they are based on indexes.

aummm maybe its stime to start using houdini...

That definitely sounds like a Houdini thing. And in fact Houdini does have a "volume select" kinda tool. All of Houdini's component selection/grouping tools are quite flexible. It'll let you specify specific point indices, grep patterns, and the volume select too.

Hope this helps... and that I don't sound like too much of a Houdini zealot :-7

-James

I had hacked this script together to work simple sphere volume selects on transforms... but it could probably be expanded (with substantially more effort) to component level stuff, with a freeform shape. But it's a starting place...

// volume select tool
// author: Warcat
//
// Description:
// Upon first execution this procedure will create a nurbs sphere. Upon second execution
// it will select any transforms within the volume of the sphere. To change the size of the
// sphere, adjust the "volumeSize" attribute.
// Keep in mind this is a "hack", the sphere is there simply as a representation of the volume.
// Changing the shape of the sphere on a component level won't effect the selection.

global proc vSelect()
{

// if no volSelect object exists, make one:

if (!`objExists volSelect`)
	{
	sphere -p 0 0 0 -ax 0 1 0 -ssw 0 -esw 360 -r 1 -d 3 -ut 0 -tol 0.01 -s 8 -nsp 4 -ch 1 -n volSelect;
	addAttr -ln volumeSize -at double  -dv 1 |volSelect;
	setAttr -e -keyable true |volSelect.volumeSize;
	setAttr -lock true "volSelect.sx";
	setAttr -lock true "volSelect.sy";
	setAttr -lock true "volSelect.sz";
	string $historyNodes[] = `listHistory volSelect`;
	for ($index = 0; $index < `size($historyNodes)`; $index++)
		{
		if (`objectType -i "makeNurbSphere" $historyNodes[$index]`)
			rename $historyNodes[$index] "volCreateOptions";
		}
	connectAttr -f volSelect.volumeSize volCreateOptions.radius;
	select -cl;
	}

// if a volSelect object does exist, select the transforms within it's volume:

else
	{
	string $allObjects[] = `ls -type transform`;
	select $allObjects;
	select -tgl volSelect;
	string $allTransforms[] = `ls -sl`;
	select -cl;
	float $volumePosition[] = `xform -q -ws -t volSelect`;
	vector $volVecPosition = <>;

	for ($transform in $allTransforms)
		{
		float $position[] = `xform -q -ws -t $transform`;
		vector $vectorPosition = <>;
		vector $vecDistance = $volVecPosition - $vectorPosition;
		float $distance = `mag $vecDistance`;
		if ($distance < `getAttr volSelect.volumeSize`)
			select -add $transform;
		}
	}
}

vSelect;