Converts selection to verts or exits the object
I'm trying to make a script that basically converts whatever you have selected (faces, edges etc) to verts if you have something selected like a face or something.
But if you don't have nothing selected or are in vert mode it won't do anything, and will leave the object.
So far I have this.
macroScript ConvertToVertOrExit category:"Pedro Scripts" toolTip:"Converts Selection to verts or exits the object" ( try ( if (subobjectlevel >= 1) then ( macros.run "Editable Polygon Object" "EPoly_Convert_Sel_To_Vertex" ) if (subobjectlevel == 1) then ( subobjectLevel = 0 clearSelection() ) if (subobjectlevel == 0) then ( ) if ( $ != undefined) then ( modPanel.setCurrentObject $ subobjectLevel = 1 ) ) catch() )
Any help is appreciated.
I guess i need a code to see if ihave something selected.