'Parents all selected objects to a null
'Command Name GP
'Use: install as command by dragging file to a toolbar. Then every time you need to parent a number
'of objects together just select them and type 'GP'.Parent Null will be created in same directory as the
'kids. Simple but useful, methinks.
'javier@internarte.com


set collection = CreateObject("XSI.Collection")
collection.additems selection
set oObj = collection(0)
set oPar = oObj.parent

	GetPrim "Null"
	set oNul = selection(0)

	
	FOR index = 0 to collection.Count -1
			set oObj = collection (index)
			CopyPaste oObj, , oNul
		NEXT
			
	CopyPaste oNul, , oPar
	Selectobj oNul

