/*
Usage :
select some points on a poly mesh and run the script.

It will add null's that are pos constrained to the points


*/


pbPointClusterNull()

function pbPointClusterNull()
{
	var osel = selection(0) ;
	var osub = osel.subcomponent ;
	var opnts = osub.ComponentCollection ;
	var oobj = osub.Parent3DObject ;
	
	for (var t = 0; t < opnts.count ; t++)
	{
			var ocluster = CreateCluster(opnts(t)) ;
			var onull = oobj.AddNull("point null" + t)
			ApplyCns("ObjectToCluster", onull, ocluster, null);
			SetValue(onull + ".kine.objclscns.upvct_active", true, null);
	}
}