ScriptSpot

Forum topic · Scripts Wanted

convert Polygons to Edges modifier

By harumscarum · 2014-01-11

Description

there is very useful trick for Edit/EditablePoly - Ctrl+click and Shift+click to covert Polygons to Edges. would be awesome to have modifier for this purpose. will appreciate for any help or suggestions. thanks

Comments (4)

dynamic updates

LittleLordPotala · 2014-01-15

AFAIK, dynamic updates in a "Select modifier" is not currently possible by using maxscript. There is too much limitations. Maybe possible if someone find a workaround to all this limitations...

IMO, what you would like needs to be hardcoded in c++.
Notice that a "dynamic plugin" means also a "slower plugin" because
it will often invalidate and recompute the cache in memory.
Best regards.

harumscarum · 2014-01-13

thanks for the hint! this is exactly what i need, but as modifier, which will work in modifier stack (dynamically updates). for example between Volume Select which get polydon selection and convert polygons to edges.

Poly_Select modifier

LittleLordPotala · 2014-01-13

Hi, There is already a plugin but it is not a "one-click" solution.
1-Apply the Poly_Select modifier
2-Enter in Edge subobject level
3-Click on button "Get Poly Selection".
As you see, there is only 3 steps but if need to do it very often you can make a shortcut with a script like this :

 
if classof $ == editable_poly do 
( 
 $.ConvertSelection #Face #Edge 
 addmodifier $ (poly_select()) 
 subobjectlevel = 2 
) 

Drag and drop the code on a custom toolbar and a new button is created.
Of course, you can modify the script to make other conversions.
Source and destination tags can be :
#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel

fzxj520 · 2021-01-01

I borrowed a paragraph from subobjects_converter.ms to use
Very convenient when I use PolyShiftUseSelectedToggle

case subobjectlevel of
(
2: try i.baseObject.ConvertSelection #Edge #Vertex catch (modPanel.getCurrentObject()).ConvertSelection #Edge #Vertex
3: try i.baseObject.ConvertSelection #Border #Vertex catch (modPanel.getCurrentObject()).ConvertSelection #Border #Vertex
4: try i.baseObject.ConvertSelection #Face #Vertex catch (modPanel.getCurrentObject()).ConvertSelection #Face #Vertex
5: try i.baseObject.ConvertSelection #Element #Vertex catch (modPanel.getCurrentObject()).ConvertSelection #Element #Vertex
)