theObj = selection[1]
if superClassOf theObj == shape then (
Nsplines=numSplines(theObj)
progressStart "Exploding"
for spl = 1 to Nsplines do 
(
	ns=splineShape prefix:theObj.name
	addnewspline ns
	for k = 1 to (numKnots theObj spl) do(
		
		knotpos = getKnotPoint theObj spl k
		segtype = getSegmentType theObj spl 1
		knottype = getKnotType theObj spl k
			
		if knottype == #bezier or knottype== #bezierCorner then 
		(
		addknot ns 1 knottype segtype knotpos (getInVec theObj spl k) (getOutVec theObj spl k)
		)
		 else
		(
			 addknot ns 1 knottype segtype knotpos
		 )
		
		
	)
	if (isClosed theObj spl) then close ns 1
	updateshape ns
	progressUpdate (100.0*spl/Nsplines)
)
progressEnd()
) else messagebox "Splines Only"