Manipulate current Poly_Select vertex selection

Hello,

I am very new at this.

I am trying to automatically edit the vertex selection of the currently selected "Poly Select" modifier (my object has many).

I need a way to read currently selected vertexes and modify the selection.

It seems I can't solve this myself.

Thanks in advance.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Graph's picture

hehe you got it skin it like

hehe you got it
skin it like an onion, layer by layer
get vertSelection (polyOp)
skin the polySelect layer
and butter it up with an edit_poly layer

you might be new to this but you already think the right way

Raphael 'Insanto' Steves
http://Graph.Net84.Net

dxmedia's picture

Thnaks very much, Yes, the

Thnaks very much,

Yes, the base is Editable Poly.
I'll give it a try.

Anyway, I'm thinking about changing all my PolySelect modifiers to EditPoly, so I have direct control, without having to collapse all my modofiers (about 60-70).

Thanks again

Graph's picture

is the baseObject of your

is the baseObject of your object an editable Poly ?

because if it isnt you cant use the polyOp or polyOps methods

heres a little function to convert the baseObject of an object to ePoly

(
	local sel = selection as array
 
	local obj = sel[1]
 
	if isValidNode obj do
	(
		if classOf obj.baseobject != Editable_Poly do
		(
			max create mode	--faster than updating the visible mod stack
 
			local mods = for i = obj.modifiers.count to 1 by -1 collect copy obj.modifiers[i]	--collect the modifiers in inverse order (copys of em)
 
			for m in obj.modifiers do deletemodifier obj m	--delete the old mods
 
			addModifier obj (EditPolyMod()) before:obj.modifiers.count	--add an ePoly mod to the stack
 
			collapseStack obj		--collapse the whole thing
 
			for m in mods do addModifier obj m		--and reApply the old mods
		)
	)
 
 
)

im sure youll find an easy way using the polyOp struct and some cheating similar to mine to tackle your problem ;)

edit: if you use it on an array of objects make sure to define the mods var as undefined at the end of every iteration, no need to play with fire right?!

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.